Skip to content

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

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

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

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.
  └ input_imagestringOptionalAn 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_formatstringOptionalThe output format of the generated image. Default: "png".
  └ safety_toleranceintegerOptionalSafety tolerance, 0 is most strict, 6 is most lenient. 2 is currently the maximum allowed when using input images. Default: 2. Min: 0, Max: 6.
  └ prompt_upsamplingbooleanOptionalAutomatic prompt improvement. Default: false.

Request Example

json
{
    "input": {
      "prompt": "Make the letters 3D, floating in space on a city street",
      "input_image": "https://replicate.delivery/xezq/XfwWjHJ7HfrmXE6ukuLVEpXWfeQ3PQeRI5mApuLXRxST7XMmC/tmpc91tlq20.png",
      "aspect_ratio": "match_input_image",
      "output_format": "jpg",
      "safety_tolerance": 2,
      "prompt_upsampling": false
    }
  }

cURL Example

bash
curl --location --request POST 'https://www.kkiai.com/replicate/v1/models/black-forest-labs/flux-kontext-max/predictions' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data-raw '{
    "input": {
      "prompt": "Make the letters 3D, floating in space on a city street",
      "input_image": "https://replicate.delivery/xezq/XfwWjHJ7HfrmXE6ukuLVEpXWfeQ3PQeRI5mApuLXRxST7XMmC/tmpc91tlq20.png",
      "aspect_ratio": "match_input_image",
      "output_format": "jpg",
      "safety_tolerance": 2,
      "prompt_upsampling": false
    }
  }'

Response

🟢 200 Success

Response Body

ParameterTypeRequiredDescription
idstringRequired
modelstringRequired
versionstringRequired
inputobjectRequired
  └ aspect_ratiostringRequired
  └ input_imagestringRequired
  └ output_formatstringRequired
  └ promptstringRequired
  └ prompt_upsamplingbooleanRequired
  └ safety_toleranceintegerRequired
logsstringRequired
outputnullRequired
data_removedbooleanRequired
errornullRequired
statusstringRequired
created_atstringRequired
urlsobjectRequired
  └ cancelstringRequired
  └ getstringRequired
  └ streamstringRequired
  └ webstringRequired

Response Example

json
{
    "id": "5pcmjq6sfnrmc0cram79p95eg4",
    "model": "black-forest-labs/flux-kontext-max",
    "version": "hidden",
    "input": {
        "aspect_ratio": "match_input_image",
        "input_image": "https://replicate.delivery/xezq/XfwWjHJ7HfrmXE6ukuLVEpXWfeQ3PQeRI5mApuLXRxST7XMmC/tmpc91tlq20.png",
        "output_format": "jpg",
        "prompt": "Make the letters 3D, floating in space on a city street",
        "prompt_upsampling": false,
        "safety_tolerance": 2
    },
    "logs": "",
    "output": null,
    "data_removed": false,
    "error": null,
    "status": "starting",
    "created_at": "2025-07-29T07:21:33.309Z",
    "urls": {
        "cancel": "https://api.replicate.com/v1/predictions/5pcmjq6sfnrmc0cram79p95eg4/cancel",
        "get": "https://api.replicate.com/v1/predictions/5pcmjq6sfnrmc0cram79p95eg4",
        "stream": "https://stream.replicate.com/v1/files/bcwr-o4bl6hrud4sg7ceoi45imkh7lq32nbyqvnsyg736v7ghpxwqxheq",
        "web": "https://replicate.com/p/5pcmjq6sfnrmc0cram79p95eg4"
    }
}