GPT-Image · Image
Image to Image
📌 What is this:Generate a new image from a reference + text.
💡 When to use:Use to restyle an image.
Endpoints
| Usage | Method | Path |
|---|---|---|
| Submit task | POST | /api/cqt/generator/sora |
| Query Result | GET | /api/cqt/info/sora?id={taskId} |
⏱ Recommended polling interval:Poll every 30s (response includes progress 0-1).
Request Parameters
| Param | Type | Required | Description |
|---|---|---|---|
| model | string | Required | gpt-image-1 / gpt-image-1.5 (4 credits), gpt-image-2 (6 credits) |
| prompt | string | Required | Image description (1–4000 chars) |
| filesUrl | string[] | Required | Reference image URL(s) |
| size | string | — | Prefer official pixel sizes (default 1024x1024). Square 1024x1024 / 2048x2048(2K); landscape 1536x1024 / 1792x1024 / 1920x1080 / 2048x1152(2K) / 3840x2160(4K); portrait 1024x1536 / 1024x1792 / 1080x1920 / 2160x3840(4K). Ratio aliases 1:1 / 2:3 / 3:2 / 16:9 / 9:16 are legacy-only (not recommended); invalid/missing falls back to 1024x1024 |
Request Example
curl -X POST https://api.cqtai.com/api/cqt/generator/sora \
-H 'Authorization: Bearer <API_KEY>' \
-H 'Content-Type: application/json' \
-d '{
"model": "gpt-image-2",
"prompt": "convert this photo into a watercolor",
"filesUrl": ["https://example.com/input.jpg"],
"size": "1024x1024"
}'
# -> { "code":200, "data":"<taskId>" }Response Example
{
"code": 200,
"msg": "success",
"data": {
"id": "<taskId>",
"status": "succeeded",
"resultUrl": "https://.../result.png",
"createTime": "2026-06-15 10:00:00",
"completeTime": "2026-06-15 10:00:20"
}
}Billing & Credits
4 / 6 / 12 credits per image (by model) (x your user rate). Auto-refunded on failure.