API reference
🇺🇸 English
  • 🇨🇳 Chinese
  • 🇺🇸 English
  1. Submit
API reference
🇺🇸 English
  • 🇨🇳 Chinese
  • 🇺🇸 English
  • Chat Models
    • Chat
      • Create chat completion
      • vision
    • OpenAI-Realtime
    • Completions
      • Instruct
    • Audio
      • Transcriptions
      • Translations
      • Speech
    • Image generation
      • DALL·E 3
    • Embeddings
      • Create
    • Models
      • model list
    • Help
      • 常见问题及解决办法
  • Anthropic
    • Anthropic Claude
      POST
  • Suno
    • Generate music
      POST
    • Generate lyrics
      POST
    • Upload music
      POST
    • Music concat
      POST
    • Fetch task
      GET
    • Fetch batch tasks
      POST
  • Udio
    • Generate music
      POST
    • Fetch task
      GET
  • Midjourney API
    • Quick
    • Task Submit
      • Imagine
      • Action
      • Modal
      • Blend
      • Describe
      • Shorten
      • Upload discord
    • Get Task
      • Fetch task by ids
      • Fetch task by id
      • Get seed
  • Flux
    • Official
      • Generate
      • Finetune
      • Fetch task
    • OpenAI Dalle3
  • Recraft
    • Official
      • Generate Image
      • Vectorize Image
      • Remove Background
      • Clarity Upscale
      • Generative Upscale
      • Create style
    • OpenAI Dalle3
  • Ideogram
    • Generate
    • Remix
    • Edit
    • Upscale
    • Describe
  • Luma
    • Official
      • Generate
      • Fetch task
    • Own format
      • Submit
        • Generate
          POST
        • Get video of no mark
          GET
        • 扩展视频
          POST
      • Get task
        • Get task
        • Get batch task
  • Runway
    • Official
      • image to video
      • get task
    • reverse
      • text to video
      • image to video
      • video2video
      • Act-one
      • Get task
  • Kling-API
    • Callback
    • Generate image
    • Text 2 Video
    • Image 2 Video
    • Video extend
    • Get task
    • lip-sync
    • kolors-virtual-try-on
  • Replicate
    • Generate
    • Get
  • MiniMax
    • Generate video
    • Get task
    • Get file
  1. Submit

Generate

POST
/luma/generations
Last modified:2025-02-05 11:30:30

Request

Authorization
Provide your bearer token in the
Authorization
header when making requests to protected resources.
Example:
Authorization: Bearer ********************
Header Params
Content-Type
string 
optional
Example:
application/json; charset=utf-8
Authorization
string 
optional
Default:
{{YOUR_API_KEY}}
Body Params application/json
user_prompt
string 
required
aspect_ratio
string 
required
expand_prompt
boolean 
optional
是否开启prompt 优化
loop
boolean 
required
循环一张参考图
image_url
string 
optional
参考图,支持第三方图片地址、Base64
image_end_url
string 
optional
关键帧,支持第三方图片地址、Base64
keyframes
object 
optional
关键帧
frame0
object 
首帧
optional
frame1
object 
尾帧
optional
notify_hook
string 
optional
回调地址: https://xxxxxxx
duration
string 
optional
Examples:
5s10s
resolution
string 
optional
Examples:
720p1080p
Example
{
  "user_prompt": "cat dance",
  "duration": "5s",
  "resolution": "1080p",
  "aspect_ratio": "16:9",
  "keyframes": {
    "frame0": {
      "type": "image",
      "url": "https://www.shutterstock.com/image-photo/beautifull-red-black-bengal-tiger-260nw-2526207017.jpg"
    }
  }
}

Request samples

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location -g --request POST '/luma/generations' \
--header 'Authorization: ' \
--header 'Content-Type: application/json; charset=utf-8' \
--data-raw '{
    "user_prompt": "cat dance",
    "duration": "5s",
    "resolution": "1080p",
    "aspect_ratio": "16:9",
    "keyframes": {
        "frame0": {
            "type": "image",
            "url": "https://www.shutterstock.com/image-photo/beautifull-red-black-bengal-tiger-260nw-2526207017.jpg"
        }
    }
}'

Responses

🟢201成功
application/json
Body
created_at
string 
required
estimate_wait_seconds
null 
required
id
string 
required
last_frame
null 
required
liked
null 
required
prompt
string 
required
state
string 
required
thumbnail
null 
required
video
null 
required
server_id
string 
optional
Example
{
  "created_at": "2024-07-22T12:47:28.553735Z",
  "estimate_wait_seconds": null,
  "id": "fc7fb008-7a5e-40ad-a7ff-dbb63db61be8",
  "last_frame": null,
  "liked": null,
  "prompt": "cat dance",
  "state": "pending",
  "thumbnail": null,
  "video": null
}
Previous
Fetch task
Next
Get video of no mark
Built with