Luma Ray 3.2 API

Restyle a clip from a prompt while keeping its motion and framing.

Luma Ray 3.2 modes

Luma AI · ray-3.2-video-to-video

Video to video

Restyle a clip from a prompt while keeping its motion and framing.

Put a prompt and "model": "ray-3.2-video-to-video" on a video clip that has your video as its src, and the render generates it and edits it into the video. To generate it on its own, send the same asset to the generate endpoint.

Built forNew settings and seasons for one shoot · Relighting · Campaign versions

Source video
Luma Ray 3.2 “Winter on the same coastal highway: fresh snow on the cliffs, soft overcast light and gentle snowfall”
Technical specifications
Input Text prompt and a source video, with an optional start image
Output Video
Length 5 or 10 seconds
Resolution 360p, 540p, 720p, 1080p
Strength 9 levels, from close to the source video to led by the prompt
JSON
{
  "asset": {
    "type": "video",
    "src": "https://shotstack.io/assets/generated/models/ray-3.2-source.mp4",
    "prompt": "Winter on the same coastal highway: fresh snow on the cliffs, soft overcast light and gentle snowfall",
    "model": "ray-3.2-video-to-video",
    "options": {
      "resolution": "1080p",
      "strength": "adhere_1",
      "startSrc": "https://shotstack.io/assets/generated/models/ray-3.2-video-to-video-start.jpg"
    }
  }
}
Example request to the generate endpoint.

Options

Option Values Default
resolution 360p, 540p, 720p, 1080p 720p
strength adhere_1, adhere_2, adhere_3, flex_1, flex_2, flex_3, reimagine_1, reimagine_2, reimagine_3
startSrc string

Luma AI · ray-3.2-reframe

Video reframing

Change a clip's shape, such as 16:9 to 9:16, by painting in the new edges from a prompt.

Put a prompt and "model": "ray-3.2-reframe" on a video clip that has your video as its src, and the render generates it and edits it into the video. To generate it on its own, send the same asset to the generate endpoint.

Built forVertical cuts from widescreen footage · One clip in every channel shape · No cropping

Source video
Luma Ray 3.2 “Extend the shot upward and downward: more morning sky above the cliffs, more sunlit road below the car”
Technical specifications
Input Text prompt and a source video
Output Video
Length 5 or 10 seconds
Resolution 360p, 540p, 720p, 1080p; 9:16 and 3:4 up to 720p
Aspect ratios 9:16, 3:4, 1:1, 4:3, 16:9, 21:9
JSON
{
  "asset": {
    "type": "video",
    "src": "https://shotstack.io/assets/generated/models/ray-3.2-source.mp4",
    "prompt": "Extend the shot upward and downward: more morning sky above the cliffs, more sunlit road below the car",
    "model": "ray-3.2-reframe",
    "options": {
      "aspectRatio": "9:16",
      "resolution": "720p"
    }
  }
}
Example request to the generate endpoint.

Options

Option Values Default
aspectRatio 9:16, 3:4, 1:1, 4:3, 16:9, 21:9 9:16
resolution 360p, 540p, 720p, 1080p 720p

Pricing

Generation is paid in credits from the same balance as rendering, at what the model's provider charges plus a small margin. See AI generation pricing.

Mode Charged per Price changes with Length a quote assumes without one
Video to video Clip of 5 or 10 seconds; a clip longer than 5 seconds is charged as 10 Resolution: 360p, 540p, 720p (default), 1080p 5 seconds
Video reframing Clip of 5 or 10 seconds; a clip longer than 5 seconds is charged as 10 Resolution: 360p, 540p, 720p (default), 1080p; 9:16 and 3:4 up to 720p 5 seconds

Get a quote

POST /generate/quote takes the same body as the generate endpoint and returns what that generation would cost. Nothing is generated, reserved or charged.

Bash
curl -X POST \
     -H "Content-Type: application/json" \
     -H "x-api-key: $SHOTSTACK_API_KEY" \
     -d '{
       "asset": {
         "type": "video",
         "src": "https://shotstack.io/assets/generated/models/ray-3.2-source.mp4",
         "prompt": "Winter on the same coastal highway: fresh snow on the cliffs, soft overcast light and gentle snowfall",
         "model": "ray-3.2-video-to-video",
         "options": {
           "resolution": "1080p",
           "strength": "adhere_1",
           "startSrc": "https://shotstack.io/assets/generated/models/ray-3.2-video-to-video-start.jpg"
         }
       }
     }' \
     https://api.shotstack.io/edit/stage/generate/quote

The response gives credits, the price of that request, and ceiling, which is true when the request has no length for a model charged by length, so the price is an estimate. Prices follow the providers, so ask again rather than storing one.

Questions

Do I need an account with the model provider?
No. Generation runs on your Shotstack API key and is paid in credits from the same balance as rendering, so there is no separate account to open and nothing extra to integrate.
Do I pay again for the same asset?
No. Every generated file is stored against your account. An asset with the same type, model, prompt, options and length as one generated before reuses the stored file at no charge.
What happens if a generation fails?
A failed generation isn't charged. If a render fails after some of its assets were generated, those assets are kept, and rendering again reuses them at no charge.
Can I generate an asset without rendering a video?
Yes. POST the asset to the generate endpoint and you get back a URL to the file, to check it before you render, to reuse it across many edits, or to use it outside Shotstack.

Start free

  • 10 free credits to start
  • No credit card required