gpt-image-2.5-sunburst-az-pure
gpt-image-2.5-sunburst-az-pure
圖像OpenAIgpt-image-2.5gpt-image-2.5-sunburst-az-pure
GPT-Image 2.5 是 OpenAI 的图像生成与编辑模型,适合文字生成图片、参考图改图、商品图优化、海报素材、创意概念图和营销视觉制作。它适合需要较高画面质量、指令理解和商业可用性的图片生成场景。
鑑權
- Base URL
https://api.dreamtoai.com- Authorization
Authorization: Bearer YOUR_API_KEY- Content-Type
application/json- 模型名稱 (model)
gpt-image-2.5-sunburst-az-pure
接入協議
為什麼選這個協議
适合已有 OpenAI Images 图片生成接口代码,且希望同步拿到图片结果的用户。
介面位址
POST/v1/images/generations
Authorization: Bearer YOUR_API_KEYContent-Type: application/json請求 / 回應 JSON
請求範例
圖片連結方式reference_images[]
{
"model": "gpt-image-2.5-sunburst-az-pure",
"prompt": "生成一张产品海报,白色背景,商业摄影风格",
"size": "2752x1536",
"response_format": "url",
"reference_images": [
"https://example.com/reference.png"
]
}Base64 方式reference_images[].mime_type + data_base64
{
"model": "gpt-image-2.5-sunburst-az-pure",
"prompt": "生成一张产品海报,白色背景,商业摄影风格",
"size": "2752x1536",
"response_format": "url",
"reference_images": [
{
"mime_type": "image/jpeg",
"data_base64": "BASE64_IMAGE_DATA"
}
]
}回應範例
{
"created": 1710000000,
"data": [
{
"url": "https://example.com/output.png"
}
]
}請求欄位 / 回應欄位
請求欄位
| 欄位 | 類型 | 必填 |
|---|---|---|
| model | string | Y |
| prompt | string | Y |
| size | string | Y |
| response_format | string | Y |
| reference_images | array | Y |
回應欄位
| 欄位 | 類型 | 必填 |
|---|---|---|
| created | integer | Y |
| data | array | Y |
| data[] | object | Y |
| data[].url | string | Y |
程式碼範例
cURLrequest.sh
curl -X POST "https://api.dreamtoai.com/v1/images/generations" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_KEY" \
-d '{
"model": "gpt-image-2.5-sunburst-az-pure",
"prompt": "生成一张产品海报,白色背景,商业摄影风格",
"size": "2752x1536",
"response_format": "url",
"reference_images": [
"https://example.com/reference.png"
]
}'
# 上傳參考檔案 cURL
curl -X POST "https://api.dreamtoai.com/v1/files/upload" \
-H "Authorization: Bearer YOUR_API_KEY" \
-F "kind=image" \
-F "purpose=reference" \
-F "[email protected]"