Z Image Turbo

按实际用量计费
ae_z_image_turbo

根据文本提示词快速生成最多四张图像,并可自定义尺寸和格式。

图像
按实际用量计费

价格说明

单次费用为(较大值(6 × 生成图像总像素量(百万像素), 0))AE积分。各项条件同时适用,按所选条件计算合计费用。

工具参数

未传入的可选参数将使用平台默认值。

参数类型必填说明默认值
request_bodyobject是暂无参数说明。—
request_body.seedinteger | unknown否 The same seed and the same prompt given to the same version of the model will output the same image every time. —
request_body.promptstring是The prompt to generate an image from.—
request_body.sync_modeboolean否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_sizeobject | string否The size of the generated image.landscape_4_3
request_body.image_size.widthinteger否The width of the generated image.512
request_body.image_size.heightinteger否The height of the generated image.512
request_body.num_imagesinteger否The number of images to generate.1
request_body.accelerationenum (none | regular | high)否The acceleration level to use.regular
request_body.output_formatenum (jpeg | png | webp)否The format of the generated image.png
request_body.num_inference_stepsinteger否The number of inference steps to perform.8
request_body.enable_safety_checkerboolean否If set to true, the safety checker will be enabled.true
request_body.enable_prompt_expansionboolean否Whether to enable prompt expansion. Note: this will increase the price by 0.0025 credits per request.false

调用示例

提交任务并查询完成结果

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

先提交任务,再用返回的 task_id 查询,直至完成。

请求代码request.sh
curl --request POST \
  --url 'https://agentearth.ai/agent-api/v1/tool/execute?tool_name=ae_z_image_turbo' \
  --header "X-Api-Key: $AGENTEARTH_API_KEY" \
  --header 'Content-Type: application/json' \
  --data-raw '{
  "params": {
    "request_body": {
      "acceleration": "regular",
      "enable_prompt_expansion": false,
      "enable_safety_checker": false,
      "image_size": {
        "height": 1024,
        "width": 1024
      },
      "num_images": 1,
      "num_inference_steps": 8,
      "output_format": "png",
      "prompt": "扁平矢量插画,大块几何纯色,无描边,无轮廓线,无黑边,无渐变网格,无噪点,颜色鲜明饱和(金黄 #FFD34D、天蓝 #4FA8FF、薄荷绿 #46D3A4、珊瑚橙 #FF7A59、奶油白 #FFFBF0)。主体:一只坐着的胖兔子,薄荷绿色身体,粉色长耳朵内侧,奶油白色肚皮,小圆尾巴。画面里只有这一个主体,居中,占画面约八成。纯白色背景,背景必须完全空白:不要背景色块、不要圆角方形底、不要场景、不要地面、不要白边贴纸、无文字、无边框、无投影。"
    }
  }
}'
返回示例response.json
JSON
{
  "description": "task accepted; poll the result via query_tool with this task_id",
  "query_tool": "ae_get_result",
  "status": "created",
  "task_id": "b9390277-2cec-4a52-bd09-9fb4c140a9af"
}