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

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

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

POST/replicate/v1/models/black-forest-labs/flux-kontext-max/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".

input_image string

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

output_format string

The output format of the generated image. Default value: "png".

prompt* string

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

prompt_upsampling boolean

Auto prompt improvements. Default value: false.

safety_tolerance integer

Security tolerance, 0 is the strictest and 6 is the loosest. 2 is currently the maximum value allowed when using input images. Default value: 2. Minimum value: 0, maximum value: 6.

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"input_image": "https://replicate.delivery/xezq/XfwWjHJ7HfrmXE6ukuLVEpXWfeQ3PQeRI5mApuLXRxST7XMmC/tmpc91tlq20.png",
5"output_format": "jpg",
6"prompt": "Make the letters 3D, floating in space on a city street",
7"prompt_upsampling": false,
8"safety_tolerance": 2
9}
10}
Code Sample cURL
1curl -X POST "https://api.digislash.com/replicate/v1/models/black-forest-labs/flux-kontext-max/predictions" \
2-H "Authorization: Bearer <API Key>" \
3-H "Content-Type: application/json" \
4-d '{
5"input": {
6"aspect_ratio": "match_input_image",
7"input_image": "https://replicate.delivery/xezq/XfwWjHJ7HfrmXE6ukuLVEpXWfeQ3PQeRI5mApuLXRxST7XMmC/tmpc91tlq20.png",
8"output_format": "jpg",
9"prompt": "Make the letters 3D, floating in space on a city street",
10"prompt_upsampling": false,
11"safety_tolerance": 2
12}
13}'
Response
1▼{
2"created_at": "2025-07-29T07:21:33.309Z",
3"data_removed": false,
4"id": "5pcmjq6sfnrmc0cram79p95eg4",
5▼"input": {
6"aspect_ratio": "match_input_image",
7"input_image": "https://replicate.delivery/xezq/XfwWjHJ7HfrmXE6ukuLVEpXWfeQ3PQeRI5mApuLXRxST7XMmC/tmpc91tlq20.png",
8"output_format": "jpg",
9"prompt": "Make the letters 3D, floating in space on a city street",
10"prompt_upsampling": false,
11"safety_tolerance": 2
12},
13"logs": "",
14"model": "black-forest-labs/flux-kontext-max",
15"status": "starting",
16▼"urls": {
17"cancel": "https://api.replicate.com/v1/predictions/5pcmjq6sfnrmc0cram79p95eg4/cancel",
18"get": "https://api.replicate.com/v1/predictions/5pcmjq6sfnrmc0cram79p95eg4",
19"stream": "https://stream.replicate.com/v1/files/bcwr-o4bl6hrud4sg7ceoi45imkh7lq32nbyqvnsyg736v7ghpxwqxheq",
20"web": "https://replicate.com/p/5pcmjq6sfnrmc0cram79p95eg4"
21},
22"version": "hidden"
23}