Docs Official API format /luma/generations
API reference

Create a video generation task

Vincent video or Tusheng video. Two request formats are supported: - Official format: prompt + keyframes - Proxy format: user_prompt + image_url Official documentation: https://docs.lumalabs.ai/docs/video-generation

POST/luma/generations

Body Parametersapplication/json

duration string

The duration only supports 5s

expand_prompt boolean

Optional, prompt word optimization switch

image_end_url string

Optional, target keyframe image

image_url string

Optional, refer to image source

loop boolean

Optional, whether to recycle the reference image

model_name string

The official display of ray-v1 and ray-v2 is ray1.6 ray2

notify_hook string

Optional, callback notification address after processing is completed

resolution string

720p or 1080p default 720p

user_prompt* string

Required, prompt word/problem description entered by the user

Responses

200 application/json
response-200 object
properties
batch_id string

Batch ID

created_at string · date-time

Creation time

estimate_wait_seconds integer nullable

Estimated waiting time (seconds) Estimated waiting time (seconds)

id string

Task ID Task ID

last_frame object nullable

Last-frame image URL

prompt string

Prompt words used Prompt words used

queue_state string nullable

Queue state

state string

task status task status

thumbnail object nullable

Thumbnail URL

video object nullable

Video URL or identifier

400 Bad request or validation failed application/json
response-400 object
properties
error* object
401 Missing or invalid API Key application/json
response-401 object
Request Body Example Submit video generation task
1{
2"duration": "5s",
3"model_name": "ray-v2",
4"resolution": "720p",
5"user_prompt": "一阵风吹过树林,使女人的面纱微微飘动。"
6}
Code Sample cURL
1curl -X POST "https://api.digislash.com/luma/generations" \
2-H "Authorization: Bearer <API Key>" \
3-H "Content-Type: application/json" \
4-d '{
5"duration": "5s",
6"model_name": "ray-v2",
7"resolution": "720p",
8"user_prompt": "一阵风吹过树林,使女人的面纱微微飘动。"
9}'
Response
1▼{
2"batch_id": "",
3"created_at": "2024-12-22T13:38:40.139Z",
4"id": "4665a07c-7641-4809-a133-10786201bb56",
5"prompt": "",
6"state": "pending"
7}