FLUX Pro Kontext Max
From 96 credits/call
ae_flux_pro_kontext_max
Create or edit an image from a text prompt and a reference image.
From 96 credits/call
Pricing
From 96 credits/call
| Condition | Charge |
|---|---|
| Per image | 96 credits/image |
Charges depend on image count.
An omitted image count is charged as one image.
Parameters
Optional parameters use the platform defaults when omitted.
| Parameter | Type | Required | Description | Default |
|---|---|---|---|---|
request_body | object | Yes | No parameter description. | — |
request_body.seed | integer | unknown | No | The same seed and the same prompt given to the same version of the model will output the same image every time. | — |
request_body.prompt | string | Yes | The prompt to generate an image from. | — |
request_body.image_url | string | Yes | Image prompt for the omni model. | — |
request_body.sync_mode | boolean | No | If `True`, the media will be returned as a data URI and the output data won't be available in the request history. | false |
request_body.num_images | integer | No | The number of images to generate. | 1 |
request_body.aspect_ratio | string | unknown | No | The aspect ratio of the generated image. | — |
request_body.output_format | enum (jpeg | png) | No | The format of the generated image. | jpeg |
request_body.enhance_prompt | boolean | No | Whether to enhance the prompt for better results. | false |
request_body.guidance_scale | number | No | The CFG (Classifier Free Guidance) scale is a measure of how close you want the model to stick to your prompt when looking for a related image to show you. | 3.5 |
request_body.safety_tolerance | enum (1 | 2 | 3 | 4 | 5 | 6) | No | The safety tolerance level for the generated image. 1 being the most strict and 5 being the most permissive. | 2 |
Invocation example
Copy the request and explore its response example.
POST
/agent-api/v1/tool/executeX-Api-KeySubmit first, then query with the returned task_id until the task completes.
Request coderequest.sh
curl --request POST \
--url 'https://agentearth.ai/agent-api/v1/tool/execute?tool_name=ae_flux_pro_kontext_max' \
--header "X-Api-Key: $AGENTEARTH_API_KEY" \
--header 'Content-Type: application/json' \
--data-raw '{
"params": {
"request_body": {
"aspect_ratio": "2:3",
"enhance_prompt": false,
"guidance_scale": 3.5,
"image_url": "https://agentearth.ai/fileserver/file/b513e0ce-2ad5-4c91-81f4-5f3f6937fca2.jpg",
"output_format": "png",
"prompt": "Replace only these texts, keep every other pixel unchanged: \"焙点仪\" -> \"PH计\"; \"WRS-2\" -> \"AZ-8601\"; \"上海卓光仪器科技有限公司\" -> \"深圳市景仪仪器仪表有限责任公司\"; \"JJG701-2008 焙点仪检定规程\" -> \"JJG919-2023 pH计检定仪检定规程\"; \"260728521\" -> \"260728522\". Keep the original Song typeface, size, weight, black ink, underline, layout, stamp, signatures, barcode, paper background and scan texture. Do not redraw or stylize anything else.",
"seed": 20261118
}
}
}'Response exampleresponse.json
{
"description": "task accepted; poll the result via query_tool with this task_id",
"query_tool": "ae_get_result",
"status": "created",
"task_id": "dafc19a9-44ca-43df-929e-0f2a9b0b8ca1"
}This example shows part of the response. Copied content is valid JSON.

