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
| Field | Type | Description |
|---|---|---|
actionrequired | string | create_image. |
modelrequired | string | A model id or "auto". |
promptrequired | string | Text description of the image. |
params.ratio | string | Aspect ratio, e.g. 16:9, 1:1, 9:16. |
params.count | integer | Number of variations (1–4). Each is billed separately. |
params.quality | string | Model-specific quality tier where supported (e.g. 4K). |
input_media_ids | string[] | 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.