Skip to main content
POST
/
v3
/
async
/
flux-1-kontext-pro
FLUX.1 Kontext Pro
curl --request POST \
  --url https://api.highwayapi.ai/v3/async/flux-1-kontext-pro \
  --header 'Authorization: <authorization>' \
  --header 'Content-Type: <content-type>' \
  --data '
{
  "prompt": "<string>",
  "images": [
    "<string>"
  ],
  "guidance_scale": 123,
  "aspect_ratio": "<string>",
  "seed": 123,
  "safety_tolerance": "<string>"
}
'
{
  "task_id": "<string>"
}
FLUX.1 Kontext Pro is a model that improves prompt adherence and consistency in font generation while maintaining high efficiency and speed, making it suitable for editing needs.

Request Headers

Content-Type
string
required
Enum value: application/json
Authorization
string
required
Bearer authentication format: Bearer {{API Key}}.

Request Body

prompt
string
required
The prompt used to generate the image.
images
string[]
A list of images used to generate the image. Up to 4 images are supported.
guidance_scale
number
Guidance scale, used to control generation. The default value is 3.5. Value range: [1.0 ~ 20.0].
aspect_ratio
string
The aspect ratio of the generated image.
Options: 21:9, 16:9, 4:3, 3:2, 1:1, 2:3, 3:4, 9:16, 9:21
seed
integer
Random seed. The default value is -1, where -1 means using a random seed. Value range: [-1 ~ 2147483647].
safety_tolerance
string
Supported only in text-to-image mode.
The safety tolerance level for the generated image, where 1 is the strictest and 5 is the most permissive. The default value is 2.
Options: 1, 2, 3, 4, 5

Response Information

task_id
string
required
The task_id of the asynchronous task. You should use this task_id to request the Get Task Result API to obtain the generation result.