Ae · Openai · Gpt · Image · 2 · 5

14.00积分/次
ae_openai_gpt_image_2_5

使用 GPT Image 2.5 Sunburst 根据文字描述生成 PNG 图片,支持设置图片数量、尺寸、质量和透明背景。

图像
14.00积分/次

价格说明

14.00积分/次

API 调用

通过统一工具网关发起同步请求,鉴权和计费由 AgentEarth 处理。

cURL
curl --request POST \
  --url 'https://api.agentearth.ai/v1/tools/run' \
  --header 'Authorization: Bearer $AGENTEARTH_API_KEY' \
  --header 'Content-Type: application/json' \
  --data-raw '{
  "tool": "ae_openai_gpt_image_2_5",
  "input": {
    "n": "1",
    "size": "1024x1024",
    "prompt": "xxx",
    "quality": "auto",
    "background": "auto",
    "moderation": "auto"
  }
}'
请求方式
POST
接口地址
/v1/tools/run
鉴权方式
Bearer Token
超时时间
60 秒
当前版本
—
响应示例
{
  "error_no": 0,
  "error_msg": "",
  "result": [
    {
      "type": "text",
      "text": "xxx"
    }
  ],
  "platform_annotations": {
    "source": "AgentEarth",
    "platform_note": "xxx",
    "platform_suggestion": "xxx"
  }
}

工具参数

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

参数类型必填说明默认值
ninteger否请求生成的图片数量,取值范围为 1 至 10,默认为 1。1
sizestring否输出图片尺寸。可传 auto(自动选择),或使用宽x高的像素格式,例如 1024x1024、1536x1024、1024x1536。具体尺寸需满足上游模型约束,默认为 1024x1024。1024x1024
promptstring是图片生成的文本提示词。建议写清主体、场景、材质、光线、构图、风格和需要渲染的文字,最多支持 32000 个字符。—
qualityenum (auto | low | medium | high)否请求的图片质量档位,可选 auto(自动选择)、low、medium 或 high,默认为 auto。auto
backgroundenum (auto | opaque | transparent)否输出图片的背景类型,可选 auto(自动选择)、opaque(不透明)或 transparent(透明)。图片以 PNG 格式输出,默认为 auto。auto
moderationenum (auto | low)否请求的内容审核级别,可选 auto 或 low,默认为 auto。low 不代表关闭审核,此参数与图片质量 quality 相互独立。auto