FLUX Pro Kontext

From 48 credits/call
ae_flux_pro_kontext

Transform a source image with text instructions, including detailed edits, scene changes, and custom aspect ratios.

Image
From 48 credits/call

Pricing

From 48 credits/call
ConditionCharge
Per image48 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.

ParameterTypeRequiredDescriptionDefault
request_bodyobjectYesNo parameter description.—
request_body.seedinteger | unknownNo The same seed and the same prompt given to the same version of the model will output the same image every time. —
request_body.promptstringYesThe prompt to generate an image from.—
request_body.image_urlstringYesImage prompt for the omni model.—
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.num_imagesintegerNoThe number of images to generate.1
request_body.aspect_ratiostring | unknownNoThe aspect ratio of the generated image.—
request_body.output_formatenum (jpeg | png)NoThe format of the generated image.jpeg
request_body.enhance_promptbooleanNoWhether to enhance the prompt for better results.false
request_body.guidance_scalenumberNo 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_toleranceenum (1 | 2 | 3 | 4 | 5 | 6)NoThe 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-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_pro_kontext' \
  --header "X-Api-Key: $AGENTEARTH_API_KEY" \
  --header 'Content-Type: application/json' \
  --data-raw '{
  "params": {
    "request_body": {
      "aspect_ratio": "2:3",
      "guidance_scale": 4.5,
      "image_url": "https://file.gw.xnetwk.net/file/6f07c7f6-1f8a-4486-9670-7c946b5caa82.png",
      "num_images": 1,
      "output_format": "png",
      "prompt": "Convert this flat grey mannequin silhouette into a finished full-body character illustration, keeping the exact same body silhouette, same standing pose, same head position, same shoulder width, same waist position, same hip width, same leg length and same garment shape. Do not change proportions. The figure is a tall slender woman with cold pale skin, long black hair fading to deep blue at the tips, hair falling over and completely covering the ears so no ears are visible, wearing the same dark floor-length gown with its high thigh slit exposing one leg, and a small whale-like tail behind her that does not touch the ground. Front view, neutral dark cold blue-grey background, matte painterly finish, soft diffused lighting, no plastic gloss, fabric folds following the existing silhouette outline.",
      "safety_tolerance": "4"
    }
  }
}'
Response exampleresponse.json
JSONPartial content
{
  "description": "task accepted; poll the result via query_tool with this task_id",
  "query_tool": "ae_get_result",
  "status": "created",
  "task_id": "0e1ff4b4-42d7-43e1-bc50-b4f64f58195b"
}

This example shows part of the response. Copied content is valid JSON.