> ## Documentation Index
> Fetch the complete documentation index at: https://docs.gmicloud.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# luma-ray-3-2-generate

> API usage guide for luma-ray-3-2-generate.

{/* source_model_id: luma-ray-3-2-generate */}

{/* source_updated_at: 1781739021 */}

**Model ID**

```bash theme={null}
luma-ray-3-2-generate
```

**Calling method:** async

# Luma Ray 3.2 — Generate

## Overview

`luma-ray-3-2-generate` uses Luma's `ray-3.2` model to create video from a text prompt (text-to-video) and from anchor images (image-to-video) via the Luma Agents API. It also covers **extend** and **chain-referenced interpolation** when a keyframe carries a prior generation id. Output is an **MP4** (HDR is a request knob, `hdr: true`, not a separate model). For restyling an existing video use **Luma Ray 3.2 — Edit**; for aspect-ratio outpaint use **Luma Ray 3.2 — Reframe**.

## Authentication

```
Authorization: Bearer YOUR_API_KEY
```

## Submit

```bash theme={null}
curl -X POST "https://console.gmicloud.ai/api/v1/ie/requestqueue/apikey/requests" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "luma-ray-3-2-generate",
    "payload": {
      "prompt": "A slow dolly shot through a misty greenhouse at sunrise",
      "aspect_ratio": "16:9",
      "resolution": "720p",
      "duration": "5s"
    }
  }'
```

## Request Parameters

| Parameter                   | Type      | Required | Description                                                                 | Default |
| --------------------------- | --------- | -------- | --------------------------------------------------------------------------- | ------- |
| `model`                     | string    | Yes      | Must be `luma-ray-3-2-generate`                                             | -       |
| `prompt`                    | string    | Yes      | Text description of the video, 1–6000 characters                            | -       |
| `aspect_ratio`              | enum      | No       | `9:16`, `3:4`, `1:1`, `4:3`, `16:9`, `21:9`                                 | `16:9`  |
| `resolution`                | enum      | No       | `540p`, `720p`, `1080p`                                                     | `720p`  |
| `duration`                  | enum      | No       | `5s` or `10s` (a 10s video bills as two 5s blocks)                          | `5s`    |
| `hdr`                       | boolean   | No       | HDR-encoded MP4. Requires HDR access and 720p/1080p                         | `false` |
| `exr_export`                | boolean   | No       | Export an EXR file alongside the MP4. Requires `hdr: true`                  | `false` |
| `loop`                      | boolean   | No       | Generate a seamless loop                                                    | `false` |
| `start_frame_url`           | image URL | No       | Start anchor frame for image-to-video (JPEG/PNG/WebP)                       | -       |
| `end_frame_url`             | image URL | No       | End anchor frame for image-to-video or interpolation                        | -       |
| `start_frame_generation_id` | string    | No       | Chain-reference a prior video as the start (forward extend / interpolation) | ""      |
| `end_frame_generation_id`   | string    | No       | Chain-reference a prior video as the end (backward extend / interpolation)  | ""      |

## Modes

* **Text-to-video**: just a `prompt`.
* **Image-to-video**: set `start_frame_url` and/or `end_frame_url`. Not supported with `duration: 10s`.
* **Extend**: exactly one chain-ref keyframe — `start_frame_generation_id` (forward, continues past the prior clip) or `end_frame_generation_id` (backward, prepends before it). Standard dynamic range only; returns one 5s block per call; `loop` is forward-only.
* **Interpolation**: set both keyframes, at least one a chain-ref `*_generation_id`.

## Status

Video generation is asynchronous and takes longer than image generation (a 5s/720p clip is usually well under two minutes; 10s/1080p/HDR can run several times longer). The submit returns `status: processing` with a `request_id`; poll until terminal:

```
GET /api/v1/ie/requestqueue/apikey/requests/{request_id}
```

`status` is `queued` → `processing` → `success` or `failed`.

## Response

```json theme={null}
{
  "request_id": "cd5b59d5-1b3f-4fd5-9899-15ecea1f28ba",
  "model": "luma-ray-3-2-generate",
  "status": "success",
  "outcome": {
    "video_url": "https://storage.googleapis.com/.../output.mp4",
    "generation_id": "d290f1ee-6c54-4b01-90e6-d701748f0851",
    "thumbnail_image_url": "https://storage.googleapis.com/.../thumbnail.jpg"
  }
}
```

Output is a single MP4 (`video_url`). Use `generation_id` to chain a follow-up extend, edit, or reframe. Presigned URLs expire after \~1 hour — re-poll to mint a fresh one.

## Constraints

* `aspect_ratio` accepts the six video ratios above; the image-only ratios `3:1`, `2:1`, `1:2`, `1:3` are rejected.
* `540p` is not available with `hdr: true`.
* `10s` is not supported with `hdr`, `start_frame`, or `end_frame`.
* `loop` is not supported with `10s`, `hdr`, or `end_frame`; on extend it is forward-only.
* `hdr` requires 720p/1080p and HDR access, and is rejected on extend; `exr_export` requires `hdr: true` and is rejected on extend.

## Pricing

Billed at the **create-tier per 5-second block**. A 10s video is two blocks; each extend call returns one 5s block.

| Quality   | 540p   | 720p   | 1080p  |
| --------- | ------ | ------ | ------ |
| SDR       | \$0.15 | \$0.30 | \$1.20 |
| HDR       | —      | \$1.20 | \$4.80 |
| HDR + EXR | —      | \$2.10 | \$8.40 |

HDR and HDR+EXR are not available on extend (standard dynamic range only).
