熊猫AI

图片生成 API 使用说明

图片生成采用 OpenAI 兼容的 /images/generations 接口。模型和图片能力需已在你的 API Key 分组中开通。

请求地址

POST https://pandai.fun/v1/images/generations

示例请求

{
  "model": "gpt-image-2",
  "prompt": "Describe the image you want to create.",
  "size": "1024x1024",
  "output_format": "png"
}

响应与排障

成功响应通常在 data 数组中返回图片 URL 或 Base64 图像字段。生成耗时受模型、尺寸、上游负载和队列影响。调用失败时,请保留请求时间、模型名称和请求 ID,再通过控制台排查。

请确认提示词、上传素材和生成用途符合所在地法律法规与上游模型服务规则。