Skip to content

Generate Images (Base64 response)

  • Endpoint: POST https://api.olddog.shop/v1/images/generations
  • Key parameter: response_format: "b64_json"

If you want the image binary content (Base64) for local saving or further processing, use the b64_json response format.

Request parameters (additional)

NameTypeRequiredDescription
response_formatstringYesMust be "b64_json".

All other parameters are the same as “Generate Images (URL response)”.

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",
    "response_format": "b64_json"
  }'