Create a generation
Submit an image or video generation job. Returns immediately with an opaque job ID to poll via GET /generations/{id}.
Parameters
Deletion deadline you set for this generation. It overrides your client's retention period for this generation, later or earlier: a successful generation is due for deletion at this deadline, a failed one at the earlier of this deadline and its failed-generation grace period, and one still running at the deadline as soon as it finishes. Once the deadline passes, GET /v1/generations/{generation_id} returns 404. Requires the managed retention add-on (managed_retention); silently ignored without it. A past value is rejected with 422; a value more than ten years ahead is clamped to ten years. See the Generation deletion guide.
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.
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.
Returns
Create a generation
luma-agents-cli generations create \ --auth-token 'My Auth Token' \ --prompt 'A glass of iced coffee on a marble countertop, morning light streaming through a window'{ "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "created_at": "2019-12-27T18:11:19.117Z", "model": "uni-1", "state": "queued", "type": "image", "failure_code": "content_moderated", "failure_reason": "failure_reason", "output": [ { "type": "type", "url": "https://example.com", "layer": { "alpha_hint": "alpha_hint", "description": "description", "index": 0, "label": "label", "bounds": { "canvas_height": 0, "canvas_width": 0, "height": 0, "width": 0, "x": 0, "y": 0 }, "contains_text": true, "text": { "content": "content", "decorated": true, "font": { "category": "sans serif", "families": [ "string" ], "italic": true, "weight": "thin", "width": "condensed", "match": { "face_id": "face_id", "family_id": "family_id", "family_name": "family_name", "style": "normal", "weight": 0 } } } } } ], "team": { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "name": "name" }, "usage": { "credits_charged": 0 }, "user_id": "user_id"}Returns Examples
{ "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "created_at": "2019-12-27T18:11:19.117Z", "model": "uni-1", "state": "queued", "type": "image", "failure_code": "content_moderated", "failure_reason": "failure_reason", "output": [ { "type": "type", "url": "https://example.com", "layer": { "alpha_hint": "alpha_hint", "description": "description", "index": 0, "label": "label", "bounds": { "canvas_height": 0, "canvas_width": 0, "height": 0, "width": 0, "x": 0, "y": 0 }, "contains_text": true, "text": { "content": "content", "decorated": true, "font": { "category": "sans serif", "families": [ "string" ], "italic": true, "weight": "thin", "width": "condensed", "match": { "face_id": "face_id", "family_id": "family_id", "family_name": "family_name", "style": "normal", "weight": 0 } } } } } ], "team": { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "name": "name" }, "usage": { "credits_charged": 0 }, "user_id": "user_id"}