/flux-kontext-pro
endpoint for its Text-to-Image capabilities.
To generate an image from text, you’ll make a request to the /flux-kontext-pro
endpoint.
id
. This ID is used to retrieve the generated image.
polling_url
to retrieve the output when ready.
result['sample']
is a signed URL for retrieval.
aspect_ratio
to adjust the dimensions while keeping the same total pixels.aspect_ratio
is not specified, the model will default to a standard aspect ratio like 1:1 (e.g. 1024x1024).Parameter | Type | Default | Description | Required |
---|---|---|---|---|
prompt | string | Text description of the desired image. | Yes | |
aspect_ratio | string / null | "1:1" | Desired aspect ratio (e.g., “16:9”). All outputs are ~1MP total. Supports ratios from 3:7 to 7:3. | No |
seed | integer / null | null | Seed for reproducibility. If null or omitted, a random seed is used. Accepts any integer. | No |
prompt_upsampling | boolean | false | If true, performs upsampling on the prompt | No |
safety_tolerance | integer | 2 | Moderation level for inputs and outputs. Value ranges from 0 (most strict) to 6 (more permissive). | No |
output_format | string | "jpeg" | Desired format of the output image. Can be “jpeg” or “png”. | No |
webhook_url | string / null | null | URL for asynchronous completion notification. Must be a valid HTTP/HTTPS URL. | No |
webhook_secret | string / null | null | Secret for webhook signature verification, sent in the X-Webhook-Secret header. | No |