Skip to content

Create Task black-forest-labs/flux-kontext-dev

POST https://www.kkiai.com/replicate/v1/models/black-forest-labs/flux-kontext-dev/predictions

Official Documentation: https://replicate.com/black-forest-labs/flux-kontext-dev

Request Parameters

Authorization

Add the Authorization parameter to the Header, with the value being the Token concatenated after Bearer

Example: Authorization: Bearer ********************

Header Parameters

ParameterTypeRequiredDescriptionExample
AuthorizationstringOptionalBearer {{YOUR_API_KEY}}

Body Parameters (application/json)

ParameterTypeRequiredDescription
inputobjectOptional
  └ promptstringRequiredA text description of the content you want to generate, or instructions on how to edit a given image.
  └ go_fastbooleanOptionalMakes the model run faster; output quality may be slightly reduced for more difficult prompts. Default: true.
  └ guidancenumberOptionalPrompt guidance strength. Default: 2.5. Min: 0, Max: 10
  └ input_imagestringRequiredThe image to use as a reference. Must be in jpeg, png, gif, or webp format.
  └ aspect_ratiostringOptionalThe aspect ratio of the generated image. Use "match_input_image" to match the aspect ratio of the input image. Default: "match_input_image".
  └ output_formatstringOptionalOutput image format. Default: "webp".
  └ output_qualityintegerOptionalQuality when saving the output image, ranging from 0 to 100. 100 is best quality, 0 is lowest quality. Not applicable to .png output. Default: 80. Min: 0, Max: 100.
  └ num_inference_stepsintegerOptionalNumber of inference steps. Default: 28. Min: 4, Max: 50.

Request Example

json
{
    "input": {
      "prompt": "Change the car color to red, turn the headlights on",
      "go_fast": true,
      "guidance": 2.5,
      "input_image": "https://replicate.delivery/pbxt/N5YURZv4ifaW2bMwU7hmrwzgtxf99DTQXpBeobLt1O7dEc3h/pexels-jmark-253096.jpg",
      "aspect_ratio": "match_input_image",
      "output_format": "jpg",
      "output_quality": 80,
      "num_inference_steps": 30
    }
  }

cURL Example

bash
curl --location --request POST 'https://www.kkiai.com/replicate/v1/models/black-forest-labs/flux-kontext-dev/predictions' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data-raw '{
    "input": {
      "prompt": "Change the car color to red, turn the headlights on",
      "go_fast": true,
      "guidance": 2.5,
      "input_image": "https://replicate.delivery/pbxt/N5YURZv4ifaW2bMwU7hmrwzgtxf99DTQXpBeobLt1O7dEc3h/pexels-jmark-253096.jpg",
      "aspect_ratio": "match_input_image",
      "output_format": "jpg",
      "output_quality": 80,
      "num_inference_steps": 30
    }
  }'

Response

🟢 200 Success

Response Body

ParameterTypeRequiredDescription
idstringOptional
modelstringOptional
versionstringOptional
inputobjectOptional
  └ aspect_ratiostringOptional
  └ input_imagestringRequired
  └ output_formatstringOptional
  └ promptstringRequired
  └ prompt_upsamplingbooleanOptional
  └ safety_toleranceintegerOptional

Response Example

json
{
    "id": "tpdf40dypdrma0cram394vvzkg",
    "model": "black-forest-labs/flux-kontext-dev",
    "version": "hidden",
    "input": {
        "aspect_ratio": "match_input_image",
        "go_fast": true,
        "guidance": 2.5,
        "input_image": "https://replicate.delivery/pbxt/N5YURZv4ifaW2bMwU7hmrwzgtxf99DTQXpBeobLt1O7dEc3h/pexels-jmark-253096.jpg",
        "num_inference_steps": 30,
        "output_format": "jpg",
        "output_quality": 80,
        "prompt": "Change the car color to red, turn the headlights on"
    },
    "logs": "",
    "output": null,
    "data_removed": false,
    "error": null,
    "status": "starting",
    "created_at": "2025-07-29T07:12:42.163Z",
    "urls": {
        "cancel": "https://api.replicate.com/v1/predictions/tpdf40dypdrma0cram394vvzkg/cancel",
        "get": "https://api.replicate.com/v1/predictions/tpdf40dypdrma0cram394vvzkg",
        "stream": "https://stream.replicate.com/v1/files/bcwr-6rywfvqq3376h7243k7xrgtnkaqpwiogzgh7kcehtx7kz3nre6fq",
        "web": "https://replicate.com/p/tpdf40dypdrma0cram394vvzkg"
    }
}