Generation

Generate images

Create images from a prompt and optional reference images.

Request

Use the create_image action. Image jobs settle quickly — the response already contains the output URLs when the model is synchronous.

curl https://api.dreamward.ai/v1/generations \
  -H "Authorization: Bearer $DREAMWARD_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "action": "create_image",
    "model": "nano-banana-2",
    "prompt": "An oversized ginger cat on a throne",
    "params": { "ratio": "1:1", "count": 2 }
  }'

Parameters

FieldTypeDescription
actionrequiredstringcreate_image.
modelrequiredstringA model id or "auto".
promptrequiredstringText description of the image.
params.ratiostringAspect ratio, e.g. 16:9, 1:1, 9:16.
params.countintegerNumber of variations (1–4). Each is billed separately.
params.qualitystringModel-specific quality tier where supported (e.g. 4K).
input_media_idsstring[]Reference image ids from /uploads, for edit / image-to-image models.

Reference images

Upload a file with POST /v1/uploads (multipart, field file) to get a media id, then pass it in input_media_ids. Slots are filled in order.

Variations

With count > 1 the request fans out into one job per variation, so each can be retried or refunded independently. The response data array holds every job.