Skip to content

Create a multi-scene story

POST
/v1/generate/story

Generate a multi-scene visual story. This runs asynchronously — the response is HTTP 202 with a job ID, not the finished images.

Define characters (with appearance descriptions and optional reference images), scenes (with per-scene prompts), and optionally a global style and setting. The model generates a reference portrait for each character first, then produces each scene maintaining visual consistency.

Poll GET /v1/jobs/{id} for progress. The scenes_completed field tells you how many scenes are done. When status is “completed”, the result contains signed URLs for all scene images.

The model must support multi-turn generation — check supports_multiturn in GET /v1/models. If it doesn’t, you’ll get a 422 with error code model_not_capable.

object
aspect_ratio

Desired aspect ratio for all scene images (default). Scenes can override.

null | string
characters
required

1 to 10 named characters appearing in the story.

array | null
object
appearance

Detailed physical description used to generate a consistent character portrait.

string
name

Character name used consistently across all story scenes.

string
reference_url

Optional HTTPS URL of a reference image for visual consistency. Must be an accessible signed URL.

null | string
states

Optional appearance variants (costumes, disguises). Max 5 per character.

object
key
additional properties
object
appearance

Description of the character’s appearance in this state.

string
reference_url

Optional HTTPS URL of a reference image for this state.

null | string
image_size

Desired image size for all scene images.

null | string
locations

Named locations with optional reference images. Scenes reference by name.

Array<object>
object
description

Visual description of the location.

string
name

Location name, referenced by scenes.

string
reference_url

Optional HTTPS URL of a location reference image.

null | string
model
required

Model identifier from the /v1/models endpoint. Must support multi-turn generation (check supports_multiturn in /v1/models).

string
prompt

Optional overall story prompt providing context for all scenes.

string
raw_prompts

When true, scene prompts are sent as-is without template wrapping. Default false.

null | boolean
reference_images

Shared reference images for general visual anchoring. Max 5.

Array<object>
object
description
required

What this image shows. The model uses this to understand what to reference.

string
url
required

HTTPS URL of the reference image. Must be publicly accessible.

string
scenes
required

2 to 10 scenes describing the story sequence.

array | null
object
aspect_ratio

Per-scene aspect ratio override.

null | string
characters

Which characters appear in this scene and in which state.

Array<object>
object
name

Character name. Must match a character from the top-level characters array.

string
state

Optional state key from the character’s states map. Omit for base appearance.

null | string
location

Location name from the locations array for this scene.

null | string
prompt

Scene-specific image generation prompt.

string
setting

Physical setting/environment for the story.

null | string
strictness

Classification strictness mode override for this request. ‘normal’ (brand-safe) or ‘liberal’ (legal limits only). Omit to use your account default.

null | string
Allowed values: normal liberal
style

Visual style applied to all scenes.

null | string

Accepted

object
job_id

Unique async job identifier. Use this to poll for status.

string format: uuid
poll_url

Absolute URL to poll for job status (GET /v1/jobs/{job_id}).

string
status

Always ‘pending’ for a freshly accepted job.

string

Bad Request

object
details
error
string
message
string
request_id
string

Unauthorized

object
details
error
string
message
string
request_id
string

Payment Required

object
details
error
string
message
string
request_id
string

Forbidden

object
details
error
string
message
string
request_id
string

Not Found

object
details
error
string
message
string
request_id
string

Conflict

object
details
error
string
message
string
request_id
string

Unprocessable Entity

object
details
error
string
message
string
request_id
string

Too Many Requests

object
details
error
string
message
string
request_id
string

Unavailable For Legal Reasons

object
details
error
string
message
string
request_id
string

Internal Server Error

object
details
error
string
message
string
request_id
string

Bad Gateway

object
details
error
string
message
string
request_id
string

Service Unavailable

object
details
error
string
message
string
request_id
string