Docs Replicate official format /replicate/v1/models/black-forest-labs/flux-kontext-dev/predictions
API reference

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

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

POST/replicate/v1/models/black-forest-labs/flux-kontext-dev/predictions

Body Parametersapplication/json

input object

Input content

properties
aspect_ratio string

The aspect ratio of the generated image. Use "match_input_image" to match the aspect ratio of the input image. Default value: "match_input_image".

go_fast boolean

Makes the model run faster, output quality may suffer slightly for more difficult prompts. Default value: true.

guidance number

Cue words guide intensity. Default value: 2.5. Minimum value: 0, maximum value: 10

input_image* string

Pictures to use as reference. Must be in jpeg, png, gif or webp format.

num_inference_steps integer

Number of inference steps, default: 28. Minimum value: 4, maximum value: 50.

output_format string

Output image format. Default: "webp".

output_quality integer

The quality at which the output image is saved, from 0 to 100. 100 is the best quality, 0 is the lowest quality. Has nothing to do with .png output. Default value: 80. Minimum value: 0, maximum value: 100.

prompt* string

A text description of what you want generated, or instructions on how to edit a given image.

Responses

200 application/json
response-200 object
properties
created_at string

Creation time

data_removed boolean

Whether sensitive data has been removed

error string nullable

Error message

id* string

Resource or task ID

input object

Input content

logs string

Run logs

model string

Model name / model ID

output string nullable

Output result

status* string

Status

urls object

List of resource URLs

version string

Version

400 Bad request or validation failed application/json
response-400 object
properties
error* object
401 Missing or invalid API Key application/json
response-401 object
Request Body Example
1{
2"input": {
3"aspect_ratio": "match_input_image",
4"go_fast": true,
5"guidance": 2.5,
6"input_image": "https://replicate.delivery/pbxt/N5YURZv4ifaW2bMwU7hmrwzgtxf99DTQXpBeobLt1O7dEc3h/pexels-jmark-253096.jpg",
7"num_inference_steps": 30,
8"output_format": "jpg",
9"output_quality": 80,
10"prompt": "Change the car color to red, turn the headlights on"
11}
12}
Code Sample cURL
1curl -X POST "https://api.digislash.com/replicate/v1/models/black-forest-labs/flux-kontext-dev/predictions" \
2-H "Authorization: Bearer <API Key>" \
3-H "Content-Type: application/json" \
4-d '{
5"input": {
6"aspect_ratio": "match_input_image",
7"go_fast": true,
8"guidance": 2.5,
9"input_image": "https://replicate.delivery/pbxt/N5YURZv4ifaW2bMwU7hmrwzgtxf99DTQXpBeobLt1O7dEc3h/pexels-jmark-253096.jpg",
10"num_inference_steps": 30,
11"output_format": "jpg",
12"output_quality": 80,
13"prompt": "Change the car color to red, turn the headlights on"
14}
15}'
Response
1▼{
2"created_at": "2025-07-29T07:12:42.163Z",
3"data_removed": false,
4"id": "tpdf40dypdrma0cram394vvzkg",
5▼"input": {
6"aspect_ratio": "match_input_image",
7"go_fast": true,
8"guidance": 2.5,
9"input_image": "https://replicate.delivery/pbxt/N5YURZv4ifaW2bMwU7hmrwzgtxf99DTQXpBeobLt1O7dEc3h/pexels-jmark-253096.jpg",
10"num_inference_steps": 30,
11"output_format": "jpg",
12"output_quality": 80,
13"prompt": "Change the car color to red, turn the headlights on"
14},
15"logs": "",
16"model": "black-forest-labs/flux-kontext-dev",
17"status": "starting",
18▼"urls": {
19"cancel": "https://api.replicate.com/v1/predictions/tpdf40dypdrma0cram394vvzkg/cancel",
20"get": "https://api.replicate.com/v1/predictions/tpdf40dypdrma0cram394vvzkg",
21"stream": "https://stream.replicate.com/v1/files/bcwr-6rywfvqq3376h7243k7xrgtnkaqpwiogzgh7kcehtx7kz3nre6fq",
22"web": "https://replicate.com/p/tpdf40dypdrma0cram394vvzkg"
23},
24"version": "hidden"
25}