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
  • Suno
    • Generate music
    • Generate lyrics
    • Upload music
    • Music concat
    • Fetch task
    • Fetch batch tasks
  • Udio
    • Generate music
    • Fetch task
  • 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
最后修改时间:2025-02-05 11:30:30

请求参数

Authorization
在 Header 添加参数
Authorization
,其值为在 Bearer 之后拼接 Token
示例:
Authorization: Bearer ********************
Header 参数
Content-Type
string 
可选
示例值:
application/json; charset=utf-8
Authorization
string 
可选
默认值:
{{YOUR_API_KEY}}
Body 参数application/json
user_prompt
string 
必需
aspect_ratio
string 
必需
expand_prompt
boolean 
可选
是否开启prompt 优化
loop
boolean 
循环一张参考图
必需
image_url
string 
可选
参考图,支持第三方图片地址、Base64
image_end_url
string 
可选
关键帧,支持第三方图片地址、Base64
keyframes
object 
关键帧
可选
frame0
object 
首帧
可选
frame1
object 
尾帧
可选
notify_hook
string 
可选
回调地址: https://xxxxxxx
duration
string 
可选
示例值:
5s10s
resolution
string 
可选
示例值:
720p1080p
示例
{
    "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"
        }
    }
}

示例代码

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
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"
        }
    }
}'

返回响应

🟢201成功
application/json
Body
created_at
string 
必需
estimate_wait_seconds
null 
必需
id
string 
必需
last_frame
null 
必需
liked
null 
必需
prompt
string 
必需
state
string 
必需
thumbnail
null 
必需
video
null 
必需
server_id
string 
可选
示例
{"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}
上一页
Fetch task
下一页
Get video of no mark
Built with