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.

Image
From 36.00 credits

Pricing

From 36.00 credits
ConditionCharge
First output megapixel36.00 credits
Each additional input or output megapixel18.00 credits

Usage is rounded up to whole megapixels.

Parameters

Optional parameters use the platform defaults when omitted.

ParameterTypeRequiredDescriptionDefault
request_bodyobjectYesNo parameter description.—
request_body.seedinteger | unknownNoThe seed to use for the generation.—
request_body.promptstringYesThe prompt to generate an image from.—
request_body.sync_modebooleanNoIf `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_sizeobject | stringNoThe size of the generated image. If `auto`, the size will be determined by the model.auto
request_body.image_size.widthintegerNoThe width of the generated image.512
request_body.image_size.heightintegerNoThe height of the generated image.512
request_body.image_urlsarrayYesList of URLs of input images for editing—
request_body.output_formatenum (jpeg | png)NoThe format of the generated image.jpeg
request_body.safety_toleranceenum (1 | 2 | 3 | 4 | 5)NoThe safety tolerance level for the generated image. 1 being the most strict and 5 being the most permissive.2
request_body.enable_safety_checkerbooleanNoWhether to enable the safety checker.true

Invocation example

Copy the request and explore its response example.

POST/agent-api/v1/tool/executeX-Api-Key

Submit 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
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"
}