FLUX 2 Pro Edit
From 36.00 credits
ae_flux_2_pro_edit
Modify existing images using a written instruction. Choose the output size and JPEG or PNG format.
From 36.00 credits
Pricing
From 36.00 credits
| Condition | Charge |
|---|---|
| First output megapixel | 36.00 credits |
| Each additional input or output megapixel | 18.00 credits |
Usage is rounded up to whole megapixels.
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 seed to use for the generation. | — |
request_body.prompt | string | Yes | The prompt to generate an image from. | — |
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.image_size | object | string | No | The size of the generated image. If `auto`, the size will be determined by the model. | auto |
request_body.image_size.width | integer | No | The width of the generated image. | 512 |
request_body.image_size.height | integer | No | The height of the generated image. | 512 |
request_body.image_urls | array | Yes | List of URLs of input images for editing | — |
request_body.output_format | enum (jpeg | png) | No | The format of the generated image. | jpeg |
request_body.safety_tolerance | enum (1 | 2 | 3 | 4 | 5) | No | The safety tolerance level for the generated image. 1 being the most strict and 5 being the most permissive. | 2 |
request_body.enable_safety_checker | boolean | No | Whether to enable the safety checker. | true |
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_2_pro_edit' \
--header "X-Api-Key: $AGENTEARTH_API_KEY" \
--header 'Content-Type: application/json' \
--data-raw '{
"params": {
"request_body": {
"image_size": {
"height": 800,
"width": 450
},
"image_urls": [
"https://cbu01.alicdn.com/img/ibank/O1CN01SaLnUslzukG0rcsm_!!2222896923179-0-cib.jpg",
"https://cbu01.alicdn.com/img/ibank/O1CN01UaD0VJ0J2jK0rcsm_!!2222896923179-0-cib.jpg",
"https://agentearth.ai/fileserver/file/b72f7c7e-0af6-4821-9514-1eb61f4e6db3.jpg"
],
"output_format": "jpeg",
"prompt": "Vertical mobile banner: the tall vertical kitchen oil sprayer from the reference photos positioned in the upper 55 percent of the frame, with the lower 45 percent left as clean empty very-light-gray negative space for a headline and benefit text to be added later. Recolor the plastic body to a clean matte light gray matching the gray reference; keep the transparent borosilicate glass reservoir with golden amber oil, MAX 100ml marking, clear cap, front press trigger, wide non-slip base, shape and proportions exactly as in the reference. Soft diffused premium studio lighting, subtle natural shadow, crisp focus, elegant minimal composition. Do not render any text, captions, watermarks, or logos."
}
}
}'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": "5a1677ba-bb91-42e2-ba1f-2c657133123f"
}
