Create a generation
Changed onSubmit an image or video generation job. Returns immediately with an opaque job ID to poll via GET /generations/{id}.
Request
- Base URLhttps://agents.lumalabs.ai/v1
- AuthHTTP bearer
Request body
Request body for submitting a generation
Model identifier. uni-1 is the default image tier; uni-1-max produces higher-quality output than uni-1 at a higher per-image price. ray-3.2 is the public video model for text-to-video, image-to-video, and video-to-video editing.
The kind of generation to perform
Text prompt
Your end-user's stable opaque identifier (no PII). Forwarded to upstream model providers as their per-user tagging field so trust & safety violations can be attributed to a specific end-user rather than the whole API account. Also used for per-end-user usage breakdowns in /v1/usage. Strongly recommended for partner integrations.
Output aspect ratio. Valid values depend on the selected model and generation type; the server validates the final model-specific set.
Style preset (auto, manga)
Output image format
Media reference for guided generation. Provide exactly one of url, inline base64 data, generation_id, or file_id. URL/data references accept image media at image positions; video_edit and video_reframe sources also accept source.url or source.data when source.media_type is a video/* MIME. generation_id chains image_edit off a prior image output, video_edit/video_reframe off a prior video output, and video.start_frame/end_frame for extension. file_id references a file previously uploaded via POST /files — see the Files API.
Reference images for style/content guidance. Up to 9 for type 'image', up to 8 for type 'image_edit'.
Enable web search grounding — the agent can search the web and download reference images before generating.
Ray 3.2 video request options. Common output settings live at the top level for type=video, type=video_edit, and type=video_reframe; video-to-video conditioning lives under edit.
Layer-extraction options for type=layering (model uni-1). The image to decompose rides body.source; body.prompt optionally guides how to split it (max 500 characters). The server plans the layers automatically before generating.
Example request
{
"prompt": "A glass of iced coffee on a marble countertop, morning light streaming through a window"
}Response
Generation submitted
Generation status and output
Generation identifier
The kind of generation to perform
Current state of the generation
Model used
Creation timestamp
Generated outputs (populated on completion)
Human-readable failure description
Machine-readable failure code for programmatic handling
Changes
- warning
added the new
layeringenum value to thetyperesponse property for the response status - info
added the new optional request property
layering - info
added the new
layeringenum value to the request propertytype
1 more change in this revision
- warning