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

FieldTypeDescription
idstringGeneration id — poll this to check status.
statusstringqueued, submitted, done, failed or canceled.
cost_creditsintegerCredits charged for this job.
outputsobject[]Result media; each has an id and a hosted url.
errorstring | nullFailure 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.