# Flux Kontext Pro > Advanced image generation and editing model with 12B parameters, leveraging multimodal flow transformers for context-aware text-to-image synthesis and precise local edits, ensuring high-resolution outputs and character consistency. ## Overview - **Model ID**: `flux-kontext-pro` - **Category**: image - **Provider**: bfl - **Status**: model_ready - **Screenshot**: `https://assets.modelslab.com/generations/ca4e4293-ca45-4ed8-83af-a7040c72e32b.webp` ## API Information This model can be used via our HTTP API. See the API documentation and usage examples below. ### Endpoint - **URL**: `https://modelslab.com/api/v7/images/image-to-image` - **Method**: POST ### Parameters - **`init_image`** (required): Please upload the reference image you want to edit. - Type: file - Example: Upload reference Image - **`prompt`** (required): Enter the prompt for what change you wanted to make in the given image - Type: textarea - Example: Enter the prompt - **`aspect_ratio`** (optional): - Type: select (options: 21:9, 16:9, 4:3, 3:2, 1:1, 2:3, 3:4, 9:16, 9:21) ## Usage Examples ### cURL ```bash curl --request POST \ --url https://modelslab.com/api/v7/images/image-to-image \ --header "Content-Type: application/json" \ --data '{ "key": "YOUR_API_KEY", "model_id": "flux-kontext-pro", "init_image": "https://assets.modelslab.com/generations/197fdb87-3d94-4a3d-bf2b-6c1b2a73a623", "prompt": "It's now snowing, everything is covered in snow", "aspect_ratio": "1:1" }' ``` ### Python ```python import requests response = requests.post( "https://modelslab.com/api/v7/images/image-to-image", headers={ "Content-Type": "application/json" }, json={ "key": "YOUR_API_KEY", "model_id": "flux-kontext-pro", "init_image": "https://assets.modelslab.com/generations/197fdb87-3d94-4a3d-bf2b-6c1b2a73a623", "prompt": "It's now snowing, everything is covered in snow", "aspect_ratio": "1:1" } ) print(response.json()) ``` ### JavaScript ```javascript fetch("https://modelslab.com/api/v7/images/image-to-image", { method: "POST", headers: { "Content-Type": "application/json" }, body: JSON.stringify({ "key": "YOUR_API_KEY", "model_id": "flux-kontext-pro", "init_image": "https://assets.modelslab.com/generations/197fdb87-3d94-4a3d-bf2b-6c1b2a73a623", "prompt": "It's now snowing, everything is covered in snow", "aspect_ratio": "1:1" }) }) .then(response => response.json()) .then(data => console.log(data)); ``` ## Links - [Model Playground](https://modelslab.com/models/flux-kontext-pro/flux-kontext-pro) - [API Documentation](https://docs.modelslab.com) - [ModelsLab Platform](https://modelslab.com)