Z Image Base

Usage-based pricing
ae_z_image_base

Generate one or more images from a text prompt, with options for size, format, and details to avoid.

Image
Usage-based pricing

Pricing

The charge per call is (max(12 × cumulative billable megapixels of successfully generated images, 0)) AE credits. All applicable conditions are combined to calculate the total.

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.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.landscape_4_3
request_body.image_size.widthintegerNoThe width of the generated image.512
request_body.image_size.heightintegerNoThe height of the generated image.512
request_body.num_imagesintegerNoThe number of images to generate.1
request_body.accelerationenum (none | regular | high)NoThe acceleration level to use.regular
request_body.output_formatenum (jpeg | png | webp)NoThe format of the generated image.png
request_body.guidance_scalenumberNoThe guidance scale to use for the image generation.4
request_body.negative_promptstringNoThe negative prompt to use for the image generation.""
request_body.num_inference_stepsintegerNoThe number of inference steps to perform.28
request_body.enable_safety_checkerbooleanNoIf set to true, the safety checker will be enabled.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_z_image_base' \
  --header "X-Api-Key: $AGENTEARTH_API_KEY" \
  --header 'Content-Type: application/json' \
  --data-raw '{
  "params": {
    "request_body": {
      "acceleration": "regular",
      "enable_safety_checker": true,
      "guidance_scale": 5,
      "image_size": {
        "height": 1024,
        "width": 1536
      },
      "negative_prompt": "bright electric blue, vivid sky blue, cyan, turquoise, light blue dominant, high brightness, oversaturated, large gold brush stroke, gold smear, golden splash, big golden area, glitter, sparkle, white glowing horizontal band, light streak, lens flare, festive glow, text, letters, words, numbers, typography, logo, brand mark, watermark, cartoon, clipart, low quality, blurry, clutter, people, religious statue, boats",
      "num_images": 1,
      "num_inference_steps": 32,
      "output_format": "png",
      "prompt": "Premium corporate dealer conference main key visual background plate for Sanya, China, wide landscape composition. COLOR IS THE PRIORITY: the frame is dominated by a very dark deep indigo navy blue, almost midnight blue, the exact dark muted tone of the Carrier brand blue oval (hex 152C73, RGB 21 44 115), covering nearly the whole image with low brightness and low saturation. Only a very subtle narrow gradient toward a slightly lighter cobalt blue glows along the extreme upper right edge. The whole image is dark, deep, low key and restrained, never bright, never electric blue, never cyan, never turquoise. Soft calm ambient dusk light, no strong illumination, no glowing light bands, no lens flare. COMPOSITION: the upper middle and left center are one large clean quiet empty dark area reserved for later typography. A low horizon sits in the lower third with a distant hazy low contrast silhouette skyline of Sanya landmarks, sail shaped Phoenix Island towers, the Luhuitou hill contour, Tianya Haijiao rocks and two slender palms, all as very subdued flat small shapes nearly dissolved into haze, kept dark and recessive. In the lower middle, abstract waves as smooth flowing horizontal ribbons and fine calligraphic curves, a nearer midground layer in a slightly lighter navy, not realistic foam or crashing surf. GOLD STRICTLY MINIMAL: only a few hairline thin brushed gold contours tracing individual wave crests and a handful of tiny gold flecks, absolutely no large gold areas, no gold brush strokes, no gold smears, no golden splash, no glitter. Premium editorial corporate key visual, Swiss level restraint, cinematic depth, soft haze, layered depth, elegant monumental, sophisticated high end commercial design, not a festive banquet backdrop. Absolutely no text, letters, numbers, logos, watermarks, labels or spec annotations."
    }
  }
}'
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": "7f1abbf0-7a76-4e76-bbfb-9715224ad0c4"
}

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