完整文档(含详细 prompt 编写指南、Playground、与 OpenAI 官方 API 差异等): docs.qcode.cc/docs/usage/image-2 →
Base URL: https://api.qcode.cc/qcode-img/v1
POST /v1/images/generations
curl https://api.qcode.cc/qcode-img/v1/images/generations \
-H "Authorization: Bearer cr_YOUR_APIKEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-image-2",
"prompt": "A cyberpunk Tokyo street at night",
"size": "1024x1024",
"quality": "low",
"n": 1
}'
| Field | Type | Description | Default |
|---|---|---|---|
model * |
string | — | |
prompt * |
string | — | |
size |
string | 1024x1024 |
|
quality |
string | medium |
|
n |
integer | 1 |
{
"created": 1777135432,
"data": [
{
"b64_json": "iVBORw0KGgo...(base64 PNG)",
"revised_prompt": "..."
}
]
}
401 invalid_api_key | |
429 image_daily_limit | |
429 concurrency_exhausted | |
429 crs_daily_exhausted | |
503 image_provider_unavailable |