Theme
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
| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
Authorization | string | Optional | Bearer {{YOUR_API_KEY}} |
Body Parameters (application/json)
| Parameter | Type | Required | Description |
|---|---|---|---|
input | object | Optional | |
└ prompt | string | Required | A text description of the content you want to generate, or instructions on how to edit a given image. |
└ go_fast | boolean | Optional | Makes the model run faster; output quality may be slightly reduced for more difficult prompts. Default: true. |
└ guidance | number | Optional | Prompt guidance strength. Default: 2.5. Min: 0, Max: 10 |
└ input_image | string | Required | The image to use as a reference. Must be in jpeg, png, gif, or webp format. |
└ aspect_ratio | string | Optional | The aspect ratio of the generated image. Use "match_input_image" to match the aspect ratio of the input image. Default: "match_input_image". |
└ output_format | string | Optional | Output image format. Default: "webp". |
└ output_quality | integer | Optional | Quality 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_steps | integer | Optional | Number 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
| Parameter | Type | Required | Description |
|---|---|---|---|
id | string | Optional | |
model | string | Optional | |
version | string | Optional | |
input | object | Optional | |
└ aspect_ratio | string | Optional | |
└ input_image | string | Required | |
└ output_format | string | Optional | |
└ prompt | string | Required | |
└ prompt_upsampling | boolean | Optional | |
└ safety_tolerance | integer | Optional |
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"
}
}