Перейти до основного вмісту
POST
/
luma
/
videos
Generate videos based on prompt and image frames
curl --request POST \
  --url https://api.acedata.cloud/luma/videos \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "loop": false,
  "action": "generate",
  "prompt": "Astronauts shuttle from space to volcano",
  "timeout": 300,
  "video_id": "<string>",
  "aspect_ratio": "<string>",
  "video_url": "<string>",
  "enhancement": true,
  "callback_url": "<string>",
  "end_image_url": "https://cdn.acedata.cloud/0iad3k.png",
  "start_image_url": "https://cdn.acedata.cloud/r9vsv9.png"
}
'
{
  "state": "completed",
  "prompt": "Astronauts shuttle from space to volcano",
  "success": true,
  "task_id": "5636d6ba-957f-475e-a98a-718a07ee89a6",
  "video_id": "b4ef4c5e-9680-41c8-a678-0ce2ce6194de",
  "video_url": "https://platform.cdn.acedata.cloud/luma/5636d6ba-957f-475e-a98a-718a07ee89a6.mp4",
  "video_width": 1552,
  "video_height": 656,
  "thumbnail_url": "https://platform.cdn.acedata.cloud/luma/5636d6ba-957f-475e-a98a-718a07ee89a6.jpg",
  "thumbnail_width": 1552,
  "thumbnail_height": 656
}

Авторизації

Authorization
string
header
обов'язково

Заголовки

accept
enum<string>

Specifies the format of the response from the server.

Доступні опції:
application/json

Тіло

application/json
loop
boolean
за замовчуванням:false

Enable loop for the generated video.

action
enum<string>
за замовчуванням:generate

Operation type. Use 'generate' for the first time and actions values for subsequent operations, and you can specify specific action to perform on the generated video.

Доступні опції:
generate,
extend
prompt
string

The prompt to generate the video.

Приклад:

"Astronauts shuttle from space to volcano"

timeout
number
за замовчуванням:300

Timeout in seconds for the API to return data.

video_id
string

The unique identifier of the generated video, for subsequent operation 'extend'. If specified, will use video_id instead of video_url.

aspect_ratio
string

The size of the generated video.

video_url
string

The URL of the video to extend, for subsequent operation 'extend'.

enhancement
boolean
за замовчуванням:true

Enable enhancement for the input prompt text, if you are not sure how to write the prompt.

callback_url
string

Webhook callback URL for asynchronous notifications.

end_image_url
string

The URL of the end image, it will be the last frame of the generated video.

Приклад:

"https://cdn.acedata.cloud/0iad3k.png"

start_image_url
string

The URL of the start image, it will be the first frame of the generated video.

Приклад:

"https://cdn.acedata.cloud/r9vsv9.png"

Відповідь

Video generated successfully or operation performed successfully.

state
string

The state of the video generation.

prompt
string

The prompt used to generate the video.

success
boolean

Indicates if the task was successful executed.

task_id
string

The ID of the imagine task.

video_id
string

The unique identifier of the generated video.

video_url
string

The URL of the generated video.

video_width
number

The width of the generated video.

video_height
number

The height of the generated video.

thumbnail_url
string

The URL of the thumbnail of the generated video.

thumbnail_width
number

The width of the thumbnail of the generated video.

thumbnail_height
number

The height of the thumbnail of the generated video.