Generate video
curl --request POST \
--url https://api.maxapi.ai/luma/v1/generations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"user_prompt": "robot fighting",
"aspect_ratio": "16:9",
"expand_prompt": true,
"image_url": ""
}
'import requests
url = "https://api.maxapi.ai/luma/v1/generations"
payload = {
"user_prompt": "robot fighting",
"aspect_ratio": "16:9",
"expand_prompt": True,
"image_url": ""
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
user_prompt: 'robot fighting',
aspect_ratio: '16:9',
expand_prompt: true,
image_url: ''
})
};
fetch('https://api.maxapi.ai/luma/v1/generations', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.maxapi.ai/luma/v1/generations"
payload := strings.NewReader("{\n \"user_prompt\": \"robot fighting\",\n \"aspect_ratio\": \"16:9\",\n \"expand_prompt\": true,\n \"image_url\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.maxapi.ai/luma/v1/generations")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"user_prompt\": \"robot fighting\",\n \"aspect_ratio\": \"16:9\",\n \"expand_prompt\": true,\n \"image_url\": \"\"\n}")
.asString();{
"id": "<string>",
"prompt": "<string>",
"state": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"video": "<string>",
"liked": true,
"estimate_wait_seconds": 123
}Generate video
POST
https://api.maxapi.ai
/
luma
/
v1
/
generations
Generate video
curl --request POST \
--url https://api.maxapi.ai/luma/v1/generations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"user_prompt": "robot fighting",
"aspect_ratio": "16:9",
"expand_prompt": true,
"image_url": ""
}
'import requests
url = "https://api.maxapi.ai/luma/v1/generations"
payload = {
"user_prompt": "robot fighting",
"aspect_ratio": "16:9",
"expand_prompt": True,
"image_url": ""
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
user_prompt: 'robot fighting',
aspect_ratio: '16:9',
expand_prompt: true,
image_url: ''
})
};
fetch('https://api.maxapi.ai/luma/v1/generations', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.maxapi.ai/luma/v1/generations"
payload := strings.NewReader("{\n \"user_prompt\": \"robot fighting\",\n \"aspect_ratio\": \"16:9\",\n \"expand_prompt\": true,\n \"image_url\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.maxapi.ai/luma/v1/generations")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"user_prompt\": \"robot fighting\",\n \"aspect_ratio\": \"16:9\",\n \"expand_prompt\": true,\n \"image_url\": \"\"\n}")
.asString();{
"id": "<string>",
"prompt": "<string>",
"state": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"video": "<string>",
"liked": true,
"estimate_wait_seconds": 123
}授权
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
请求体
application/json