Skip to content

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 ​

NameTypeRequiredDescription
promptstringYesText prompt for image generation.
modelstringNoImage model ID (if supported).
nintegerNoNumber of images to generate. Default 1.
sizestringNoSize, e.g. 1024x1024, 512x512 (subject to model support).
qualitystringNoQuality tier (e.g. standard / hd, subject to model support).
stylestringNoStyle (e.g. vivid / natural, subject to model support).
userstringNoEnd-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
  }'