- Get Started
- Endpoints
- Flux
- AI Hug
- LLM
- Midjourney
- Faceswap
- TTS
- Song(Suno+Udio)
- Trellis
- Luma Dream Machine
- Kling
- Hailuo
- Skyreels
- WanX
- Hunyuan Video
- PiAPI Account Management
- Mmaudio
- DiffRhythm
- Tools
- Resources
- Legacy Documentation
Video Generation
POST
https://api.piapi.ai/api/luma/v1/video
legacy/Dream Machine
Request
Header Params
X-API-Key
string
required
Body Params application/json
prompt
string
required
expand_prompt
boolean
required
false
. We have tested that the value false
results in better quality.image_url
string
optional
image_end_url
string
optional
loop
boolean
optional
Example
{
"prompt": "A flying cat",
"expand_prompt": true,
"image_url": "https://iili.io/dKqFZ9n.md.png"
}
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 --request POST 'https://api.piapi.ai/api/luma/v1/video' \
--header 'X-API-Key;' \
--header 'Content-Type: application/json' \
--data-raw '{
"prompt": "A flying cat",
"expand_prompt": true,
"image_url": "https://iili.io/dKqFZ9n.md.png"
}'
Responses
🟢200OK
application/json
Body
code
integer
optional
data
object
optional
task_id
string
optional
message
string
optional
Example
{
"code": 200,
"data": {
"task_id": "6c4e**********************aaa"
},
"message": "success"
}
🟠400Bad Request
🟠401Unauthorized
🔴500Server Error
Modified at 2024-09-24 02:23:40