Images

Generate one or more images from a text prompt. Synchronous — the result returns in the same response.

POST/v1/images/generations

Request body#

FieldTypeDescription
modelrequiredstringAn image model id (e.g. gpt-image-1).
promptrequiredstringWhat to generate.
nintegerNumber of images, 1–10. Default 1.
sizestringPixel size, e.g. "1024x1024". Default 1024x1024.
qualitystringQuality tier (model-dependent), e.g. standard / hd.
response_formatstringurl (default) or b64_json.

Example#

bash
curl https://api.studio.whalli.com/v1/images/generations \
  -H "Authorization: Bearer $WHALLI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gpt-image-1",
    "prompt": "A watercolor whale gliding over a city",
    "size": "1024x1024"
  }'

Response#

json
{
  "created": 1782000000,
  "data": [
    { "url": "https://.../image.png" }
  ]
}
Set response_format: "b64_json" to receive base64 bytes inline instead of a URL — useful when you want to store the image yourself without a second request.