Kling Image O3 Text To Image

Usage-based pricing
ae_kling_image_o3_text_to_image

Create images or related image series from text prompts, with optional character or object reference images.

Image
Usage-based pricing

Pricing

ConditionCharge
image resolution is 1K33.6 AE credits per image, based on the number of images actually generated and delivered.
image resolution is 2K33.6 AE credits per image, based on the number of images actually generated and delivered.
image resolution is 4K67.2 AE credits per image, based on the number of images actually generated and delivered.
image resolution not supplied33.6 AE credits per image, based on the number of images actually generated and delivered.

Charges are based on the images actually generated and delivered; the requested image count does not determine the number delivered.

Parameters

Optional parameters use the platform defaults when omitted.

ParameterTypeRequiredDescriptionDefault
request_bodyobjectYesNo parameter description.—
request_body.promptstringYesText prompt for image generation. Max 2500 characters.—
request_body.elementsarray | unknownNoOptional: Elements (characters/objects) for face control. Reference in prompt as @Element1, @Element2, etc.—
request_body.elements[].frontal_image_urlstring | unknownNoThe frontal image of the element (main view). Optional.—
request_body.elements[].reference_image_urlsarray | unknownNoAdditional reference images from different angles. 0-3 images supported. Optional.—
request_body.sync_modebooleanNoIf `True`, the media will be returned as a data URI.false
request_body.num_imagesintegerNoNumber of images to generate (1-9). Only used when result_type is 'single'.1
request_body.resolutionenum (1K | 2K | 4K)NoImage generation resolution. 1K: standard, 2K: high-res, 4K: ultra high-res.1K
request_body.result_typeenum (single | series)NoResult type. 'single' for one image, 'series' for a series of related images.single
request_body.aspect_ratioenum (16:9 | 9:16 | 1:1 | 4:3 | 3:4 | 3:2 | 2:3 | 21:9)NoAspect ratio of generated images.16:9
request_body.output_formatenum (jpeg | png | webp)NoThe format of the generated image.png
request_body.series_amountinteger | unknownNoNumber of images in series (2-9). Only used when result_type is 'series'.—

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_kling_image_o3_text_to_image' \
  --header "X-Api-Key: $AGENTEARTH_API_KEY" \
  --header 'Content-Type: application/json' \
  --data-raw '{
  "params": {
    "request_body": {
      "aspect_ratio": "16:9",
      "num_images": 1,
      "output_format": "png",
      "prompt": "Wide 16:9 authentic retro pixel-art fighting-game scene. An azure-blue humanoid combat mech on the left fires a bright cyan chest cannon at a crimson-red humanoid combat mech on the right, with visible impact sparks and one coherent action moment. Side-view duel on a dark futuristic city rooftop, large amber setting sun, dark purple night sky, crisp square pixels and faithful blocky mech silhouettes. Leave a quiet uncluttered area in the upper-left sky for a title to be added later. No text, letters, numbers, logos, HUD, health bars, buttons, watermark, border, commercial badges, unrelated characters, or extra weapons.",
      "resolution": "2K",
      "result_type": "single",
      "sync_mode": false
    }
  }
}'
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": "4036f7a4-4642-441e-8cf9-1bc226f66d32"
}