# Flux Kontext Dev > Open-weight 12B parameter multimodal flow transformer enabling precise, iterative image editing with superior character retention, local edits, style transfer, and fast real-time performance. ## Overview - **Model ID**: `flux-kontext-dev` - **Category**: flux - **Provider**: modelslab - **Status**: model_ready - **Screenshot**: `https://pub-3626123a908346a7a8be8d9295f44e26.r2.dev/livewire-tmp/A3tMpcH1U9p0TcYJDcFJIoFw5hOReQ-metaZmx1eCBrb3RleHIgZGV2LndlYnA=-.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/v6/images/img2img` - **Method**: POST ### Parameters - **`init_image`** (required): Please upload the reference image you want to edit. - Type: file (image/jpeg,image/png) - Example: Upload reference Image - **`init_image_2`** (required): Second image is optional. only upload second image when you want to merge 2 image. - Type: file (image/jpeg,image/png) - Example: Upload second reference Image (Optional) - **`prompt`** (required): Enter the prompt for what change you wanted to make in the given image - Type: textarea - Example: Enter the prompt - **`num_inference_steps`** (optional): Steps control how many times the model refines the image. More steps = better quality, Fewer steps = faster results but less detail. - Type: number (range: 20-30) - **`guidance`** (optional): Guidance (CFG Scale) helps control how closely the image matches your text prompt. Higher values = more accurate to the prompt, 2.5 works best - Type: text ## Usage Examples ### cURL ```bash curl --request POST \ --url https://modelslab.com/api/v6/images/img2img \ --header "Content-Type: application/json" \ --data '{ "key": "YOUR_API_KEY", "model_id": "flux-kontext-dev", "init_image": "https://assets.modelslab.com/generations/f0009374-6da5-4612-81f1-4b599090a782", "init_image_2": "https://assets.modelslab.com/generations/b8bb2cd3-549a-46bb-863d-434f4310b2af", "prompt": "a girl from image one holding the can from image two", "num_inference_steps": "28", "guidance": "2.5" }' ``` ### Python ```python import requests response = requests.post( "https://modelslab.com/api/v6/images/img2img", headers={ "Content-Type": "application/json" }, json={ "key": "YOUR_API_KEY", "model_id": "flux-kontext-dev", "init_image": "https://assets.modelslab.com/generations/f0009374-6da5-4612-81f1-4b599090a782", "init_image_2": "https://assets.modelslab.com/generations/b8bb2cd3-549a-46bb-863d-434f4310b2af", "prompt": "a girl from image one holding the can from image two", "num_inference_steps": "28", "guidance": "2.5" } ) print(response.json()) ``` ### JavaScript ```javascript fetch("https://modelslab.com/api/v6/images/img2img", { method: "POST", headers: { "Content-Type": "application/json" }, body: JSON.stringify({ "key": "YOUR_API_KEY", "model_id": "flux-kontext-dev", "init_image": "https://assets.modelslab.com/generations/f0009374-6da5-4612-81f1-4b599090a782", "init_image_2": "https://assets.modelslab.com/generations/b8bb2cd3-549a-46bb-863d-434f4310b2af", "prompt": "a girl from image one holding the can from image two", "num_inference_steps": "28", "guidance": "2.5" }) }) .then(response => response.json()) .then(data => console.log(data)); ``` ## Links - [Model Playground](https://modelslab.com/models/flux-kontext-dev/flux-kontext-dev) - [API Documentation](https://docs.modelslab.com) - [ModelsLab Platform](https://modelslab.com)