{"openapi":"3.0.2","info":{"title":"luma_2/ray-3.2","description":"The request body Comfy Router accepts for the model \"luma_2/ray-3.2\", and the response body it returns. The INPUT schema is the same schema the server validates a call against before it reaches the provider, so what is published and what is enforced cannot differ. `x-comfy-router-input-modalities` records the media kinds the model is documented to accept; the request schema is shared across sibling models and may admit media kinds this model ignores. The OUTPUT schema describes the provider's native result document exactly as Router returns it: Router does not validate, narrow or re-envelope the response, so the output schema is descriptive rather than enforced, and Comfy owns no output shape of its own.","version":"e0118cff9285"},"paths":{"/v2/models/luma_2/ray-3.2":{"post":{"operationId":"runRouterModel","summary":"Run luma_2/ray-3.2 synchronously.","security":[{"BearerAuth":[]},{"ApiKeyAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"description":"The Luma Agents generation request object","example":{"prompt":"a paper boat drifting across a plain white background","type":"video","video":{"duration":"5s","resolution":"360p"}},"properties":{"aspect_ratio":{"$ref":"#/components/schemas/LumaAgentsAspectRatio"},"image_ref":{"description":"Reference images for style/content guidance. Up to 9 for type 'image', up to 8 for type 'image_edit'.","items":{"$ref":"#/components/schemas/LumaAgentsImageRef"},"type":"array"},"model":{"description":"Model to use. uni-1 / uni-1-max for image generation, ray-3.2 for video generation, editing, and reframing.","type":"string"},"output_format":{"$ref":"#/components/schemas/LumaAgentsOutputFormat"},"prompt":{"description":"Text prompt","type":"string"},"source":{"$ref":"#/components/schemas/LumaAgentsImageRef"},"style":{"$ref":"#/components/schemas/LumaAgentsStyle"},"type":{"$ref":"#/components/schemas/LumaAgentsGenerationType"},"video":{"$ref":"#/components/schemas/LumaAgentsVideoOptions"},"web_search":{"description":"Enable web search grounding","type":"boolean"}},"required":["prompt"],"type":"object"}}}},"responses":{"200":{"description":"OK - the model's native JSON output, returned unchanged; the schema describes the provider's terminal result document as Router returns it.","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/LumaAgentsGeneration"}],"description":"Comfy Router output schema for the Luma Agents models: the terminal `GET /proxy/luma_2/generations/{generation_id}` document, forwarded unchanged. The operation is SUBMIT-AND-POLL — `routerresult/classification.go` records `{provider: luma_2, endpoint: /generations}` as `ReturnModeSubmitPoll` — and Router polls on the caller's behalf, so the body a caller receives is the finished generation rather than the `{id, state: queued}` handle the underlying submit answers with.\nThe generated media (images, or video for ray-3.2) is in `output`, each with its URL at `output[].url`. Read the LEAF rather than the container: `LumaAgentsGenerationOutput.type` is a media-kind discriminator, so an element carrying only a `type` is a completed generation that produced nothing — which `routerpollstate.classifyLumaAgents` answers as `success_without_output` (`anyElementNonEmptyAt` over `output[].url`) rather than as a result.\n`output[].url` is a PRESIGNED link with roughly a one-hour expiry, so download it promptly rather than storing it.\n`state` is the Agents vocabulary — `queued`, `processing` (NOT the Dream Machine's `dreaming`), `completed`, `failed` — forwarded unchanged. A failed generation carries the machine-readable `failure_code` (`content_moderated`, `generation_failed`, `budget_exhausted`, `output_not_found`) alongside a human-readable `failure_reason`; `routererr`'s `luma_agents` adapter refines on that code, so a moderated generation reaches the caller as `content_policy_violation` rather than as a generic `provider_error`.\nLuma can also refuse the submit, before any generation exists. A prompt its moderation rejects is `content_policy_violation` there too. A request it rejects as invalid (HTTP `400` or `422`, or a `404` for a `generation_id` it does not know) is `invalid_input`, with Luma's reason in `upstream_detail` when Luma gives one. Neither is charged.\nBOTH FAILURE FIELDS ARE NULLABLE, and a successful generation is where you meet that: Luma emits `failure_code` and `failure_reason` as explicit `null`s rather than omitting them, so a caller must treat null and absent alike instead of reading either key as evidence of a failure. Branch on `state` — or on `output[].url` — never on the presence of these keys.\nThe legacy `luma/*` Dream Machine image and video ids are not described here. photon-1 and photon-flash-1 are withdrawn from the Router catalog, and ray-2 and ray-flash-2 were retired on 2026-10-24. None of them resolves through Router, and none has a Router output document. The v1 `GET /proxy/luma/generations/{id}` response is unchanged.","example":{"created_at":"2027-01-01T00:00:00Z","failure_code":null,"failure_reason":null,"id":"gen-luma-agents-ray32-9c1f3a0e7d52","model":"ray-3.2","output":[{"type":"video","url":"https://example.invalid/luma_2/ray-3.2/generated.mp4"}],"state":"completed","type":"video"}}}}}}}}},"components":{"schemas":{"LumaAgentsAspectRatio":{"description":"Output aspect ratio. The ray-3.2 video models support the subset 9:16, 3:4, 1:1, 4:3, 16:9, 21:9.","enum":["3:1","2:1","21:9","16:9","3:2","4:3","1:1","3:4","2:3","9:16","1:2","1:3"],"type":"string"},"LumaAgentsFailureCode":{"description":"Machine-readable failure code for programmatic handling","enum":["content_moderated","generation_failed","budget_exhausted","output_not_found"],"type":"string"},"LumaAgentsGeneration":{"description":"Generation status and output","properties":{"created_at":{"description":"Creation timestamp","type":"string"},"failure_code":{"allOf":[{"$ref":"#/components/schemas/LumaAgentsFailureCode"}],"description":"Machine-readable failure code, populated only on a FAILED generation. `null` on a successful one.","nullable":true},"failure_reason":{"description":"Human-readable failure description, populated only on a FAILED generation. `null` on a successful one.","nullable":true,"type":"string"},"id":{"description":"Generation identifier","type":"string"},"model":{"description":"Model used","type":"string"},"output":{"items":{"$ref":"#/components/schemas/LumaAgentsGenerationOutput"},"type":"array"},"state":{"$ref":"#/components/schemas/LumaAgentsState"},"type":{"$ref":"#/components/schemas/LumaAgentsGenerationType"}},"type":"object"},"LumaAgentsGenerationOutput":{"description":"A generated output entry","properties":{"type":{"description":"Media type (e.g. image)","type":"string"},"url":{"description":"Presigned URL (1hr expiry)","type":"string"}},"type":"object"},"LumaAgentsGenerationType":{"description":"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.","enum":["image","image_edit","video","video_edit","video_reframe"],"type":"string"},"LumaAgentsImageRef":{"description":"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.","properties":{"data":{"description":"Base64-encoded image or video data","type":"string"},"generation_id":{"description":"UUID of a prior completed generation to reuse as the source. Used by ray-3.2 video_edit / video_reframe.","type":"string"},"media_type":{"description":"MIME type. Required with data (and with url for video sources, e.g. video/mp4 on video_edit / video_reframe).","type":"string"},"url":{"description":"Publicly accessible image or video URL","type":"string"}},"type":"object"},"LumaAgentsOutputFormat":{"description":"Output image format","enum":["png","jpeg"],"type":"string"},"LumaAgentsState":{"description":"Current state of the generation","enum":["queued","processing","completed","failed"],"type":"string"},"LumaAgentsStyle":{"description":"Style preset","enum":["auto","manga"],"type":"string"},"LumaAgentsVideoDuration":{"description":"Clip duration for ray-3.2 video / video_edit. Defaults to 5s. HDR generation (type video) is restricted to 5s.","enum":["5s","10s"],"type":"string"},"LumaAgentsVideoOptions":{"description":"Video output settings for ray-3.2. Only the fields that affect validation and billing are modelled here; additional fields (edit controls, source_position) are forwarded to Luma untouched.","properties":{"duration":{"$ref":"#/components/schemas/LumaAgentsVideoDuration"},"end_frame":{"allOf":[{"$ref":"#/components/schemas/LumaAgentsImageRef"}],"description":"Ending guide frame. An image seeds image-to-video; a `generation_id` makes the request a backward single-keyframe extend, billed as one 5s block."},"exr_export":{"description":"Not available yet: requests with exr_export=true are rejected with 400 until Luma ships EXR delivery. Will export an EXR file alongside the MP4 (requires hdr true). Rejected for video_reframe.","type":"boolean"},"hdr":{"description":"Render in HDR. Requires 720p/1080p. Rejected for video_reframe.","type":"boolean"},"keyframe_indexes":{"description":"Output-frame positions for `keyframes`, same length; 0–120 for 5s, 0–240 for 10s. Forwarded untouched.","items":{"type":"integer"},"type":"array"},"keyframes":{"description":"Guide-frame images (1–64), mutually exclusive with start_frame/end_frame. Billed at the requested duration; a keyframes request is never a single-keyframe extend.","items":{"$ref":"#/components/schemas/LumaAgentsImageRef"},"type":"array"},"loop":{"description":"Loop the generated clip. Create-only (type video).","type":"boolean"},"resolution":{"$ref":"#/components/schemas/LumaAgentsVideoResolution"},"start_frame":{"allOf":[{"$ref":"#/components/schemas/LumaAgentsImageRef"}],"description":"Starting guide frame. An image seeds image-to-video; a `generation_id` makes the request a forward single-keyframe extend, billed as one 5s block."}},"type":"object"},"LumaAgentsVideoResolution":{"description":"Output resolution for ray-3.2 video. Defaults to 720p. 360p is the draft tier. HDR requires 720p or 1080p.","enum":["360p","540p","720p","1080p"],"type":"string"}},"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"X-API-Key"},"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}}},"x-comfy-router-model-id":"luma_2/ray-3.2","x-comfy-input-schema-authored":true,"x-comfy-output-schema-authored":true,"x-comfy-router-input-modalities":["text","image","video"],"x-comfy-router-output-modalities":["video"]}
