AI Model APIImagesAsync Image Tasks
Submit Async Image Generation Task
Submit an image generation task and receive a task ID. Poll the GET endpoint to check status and retrieve results.
Recommended for models with long generation times (typically 30+ seconds).
Supported models: gpt-image-2 (Tencent VOD AIGC)
Authorization
BearerAuth
AuthorizationBearer <token>
使用 Bearer Token 认证。
格式: Authorization: Bearer sk-xxxxxx
In: header
Request Body
application/json
model*string
模型名称
prompt*string
图像描述提示词
size?string
图像尺寸,格式为 宽x高,例如 1024x1024、1024x1536、1536x1024
quality?string
图像质量。standard(标准质量)或 hd(高清质量)。默认 standard。部分模型支持。
n?integer
生成图像数量。默认 1。部分模型支持多张,不支持时忽略。
style?string
图像风格,如 vivid、natural。部分模型支持。
output_format?string
输出图像格式。支持 png(默认)、jpeg、webp。部分模型支持。
output_compression?integer
输出图像压缩质量(0-100),仅在 output_format 为 jpeg 或 webp 时有效。部分模型支持。
metadata?
模型扩展参数,部分参数仅特定模型支持,不支持的字段将被忽略。
Response Body
application/json
curl -X POST "https://loading/v1/image-tasks/submit" \ -H "Content-Type: application/json" \ -d '{ "model": "gpt-image-2", "prompt": "一只橙色的猫坐在窗台上,背景是城市夜景" }'{
"id": "string",
"task_id": "string",
"status": "string",
"model": "string",
"created_at": 0
}How is this guide?