Generate Images (URL response)
- Endpoint:
POST https://api.olddog.shop/v1/images/generations - Authentication:
Authorization: Bearer <API_KEY> - Content-Type:
application/json
Generate images from a text prompt and return image URLs (compatible with OpenAI Images Generations).
Request parameters
| Name | Type | Required | Description |
|---|---|---|---|
| prompt | string | Yes | Text prompt for image generation. |
| model | string | No | Image model ID (if supported). |
| n | integer | No | Number of images to generate. Default 1. |
| size | string | No | Size, e.g. 1024x1024, 512x512 (subject to model support). |
| quality | string | No | Quality tier (e.g. standard / hd, subject to model support). |
| style | string | No | Style (e.g. vivid / natural, subject to model support). |
| user | string | No | End-user identifier. |
cURL example
bash
curl --request POST "https://api.olddog.shop/v1/images/generations" \
--header "Authorization: Bearer $OLD_DOG_API_KEY" \
--header "Content-Type: application/json" \
--data '{
"prompt": "一只戴着飞行员护目镜的柯基,赛博朋克霓虹街景,超清细节",
"size": "1024x1024",
"n": 1
}'