Concepts
Media responses
How generation results are shaped and delivered.
The job object
Every generation returns one or more job objects inside a data array.
{
"id": "gen_9f2c...",
"action": "create_image",
"model": "nano-banana-2",
"status": "done",
"cost_credits": 11,
"outputs": [{ "id": "med_a1b2...", "url": "https://cdn.dreamward.ai/..." }],
"error": null
}Fields
| Field | Type | Description |
|---|---|---|
id | string | Generation id — poll this to check status. |
status | string | queued, submitted, done, failed or canceled. |
cost_credits | integer | Credits charged for this job. |
outputs | object[] | Result media; each has an id and a hosted url. |
error | string | null | Failure reason when status is failed. |
Output hosting
Results are mirrored to Dreamward storage and served from a stable CDN URL, so links don't expire the way raw provider URLs do.
Webhooks
Instead of polling, register a callback to be notified when a job reaches a terminal state. Delivery is idempotent — the same terminal event may arrive more than once and should be de-duplicated by job id.