luma_2/uni-1, served by Comfy Router from Luma 2.
Quick start
Create a key at platform.comfy.org/profile/api-keys and export it asCOMFY_API_KEY. The Python and TypeScript snippets use the Comfy SDKs (pip install comfy-sdk, npm install @comfyorg/sdk); the cURL snippet is the same call over raw HTTP.
Model ID: luma_2/uni-1
Endpoint: POST https://api.comfy.org/v2/models/luma_2/uni-1
Schema
Input
string
Output aspect ratio. The ray-3.2 video models support the subset 9:16, 3:4, 1:1, 4:3, 16:9, 21:9.Possible values:
3:1, 2:1, 21:9, 16:9, 3:2, 4:3, 1:1, 3:4, 2:3, 9:16, 1:2, 1:3object[]
Reference images for style/content guidance. Up to 9 for type ‘image’, up to 8 for type ‘image_edit’.
string
Base64-encoded image or video data
string
UUID of a prior completed generation to reuse as the source. Used by ray-3.2 video_edit / video_reframe.
string
MIME type. Required with data (and with url for video sources, e.g. video/mp4 on video_edit / video_reframe).
string
Publicly accessible image or video URL
string
Model to use. uni-1 / uni-1-max for image generation, ray-3.2 for video generation, editing, and reframing.
string
Output image formatPossible values:
png, jpegstring
required
Text prompt
object
Reference to an image or video. Used for style/content guidance, guided generation, video-edit/video-reframe sources, and guide keyframes. Provide exactly one of generation_id, url, or data.
string
Base64-encoded image or video data
string
UUID of a prior completed generation to reuse as the source. Used by ray-3.2 video_edit / video_reframe.
string
MIME type. Required with data (and with url for video sources, e.g. video/mp4 on video_edit / video_reframe).
string
Publicly accessible image or video URL
string
Style presetPossible values:
auto, mangastring
The kind of generation to perform. image/image_edit are produced by the uni-1 / uni-1-max models; video/video_edit/video_reframe are produced by the ray-3.2 model.Possible values:
image, image_edit, video, video_edit, video_reframeobject
Video output settings for ray-3.2. Only the fields that affect validation and billing are modelled here; additional fields (edit controls, end_frame, loop, source_position) are forwarded to Luma untouched.
string
Clip duration for ray-3.2 video / video_edit. Defaults to 5s. HDR generation (type video) is restricted to 5s.Possible values:
5s, 10sboolean
Export an EXR file alongside the MP4. Requires hdr true. Rejected for video_reframe.
boolean
Render in HDR. Requires 720p/1080p. Rejected for video_reframe.
object[]
Guide-frame images. A single keyframe makes a type “video” request a single-keyframe extend, which always bills as one 5s block.
string
Base64-encoded image or video data
string
UUID of a prior completed generation to reuse as the source. Used by ray-3.2 video_edit / video_reframe.
string
MIME type. Required with data (and with url for video sources, e.g. video/mp4 on video_edit / video_reframe).
string
Publicly accessible image or video URL
boolean
Loop the generated clip. Create-only (type video).
string
Output resolution for ray-3.2 video. Defaults to 720p. 360p is the draft tier. HDR requires 720p or 1080p.Possible values:
360p, 540p, 720p, 1080pobject
Reference to an image or video. Used for style/content guidance, guided generation, video-edit/video-reframe sources, and guide keyframes. Provide exactly one of generation_id, url, or data.
string
Base64-encoded image or video data
string
UUID of a prior completed generation to reuse as the source. Used by ray-3.2 video_edit / video_reframe.
string
MIME type. Required with data (and with url for video sources, e.g. video/mp4 on video_edit / video_reframe).
string
Publicly accessible image or video URL
boolean
Enable web search grounding
GET /v2/models/luma_2/uni-1/openapi.json, the same document it validates a call against before the request reaches the provider.
Output
string
Creation timestamp
string
Machine-readable failure code for programmatic handlingPossible values:
content_moderated, generation_failed, budget_exhausted, output_not_foundstring
Human-readable failure description, populated only on a FAILED generation.
null on a successful one.string
Generation identifier
string
Model used
object[]
A generated output entry
string
Media type (e.g. image)
string
Presigned URL (1hr expiry)
string
Current state of the generationPossible values:
queued, processing, completed, failedstring
The kind of generation to perform. image/image_edit are produced by the uni-1 / uni-1-max models; video/video_edit/video_reframe are produced by the ray-3.2 model.Possible values:
image, image_edit, video, video_edit, video_reframeExamples
Input
Output
Before you ship
The snippets above are the shortest working call. Three things are the same for every model and are documented once on the Comfy Router headers page: send anIdempotency-Key on every paid call and reuse it when you retry, expect the connection to be held up to Router’s 10 minute deadline, and keep X-Comfy-Request-Id from every response. The SDKs do all three for you; the cURL tab does none of them. On failure, X-Comfy-Error-Type names the bucket, and a 422 means the body failed the model’s schema and was never billed.
Headers
Authentication, idempotency, request IDs, error buckets, retry pacing, spend limits.
Quick Start
Typed error handling in Python and TypeScript, reading the 422, walking the catalog.
Limitations
What Router does not do today, and what to use instead.