POST /luma/generations
Method: POSTEndpoint: /luma/generations
Whether to enable prompt optimization
Request Parameters
Header Parameters
text
Authorization
string
Optional
Default Value:
Bearer {{YOUR_API_KEY}}Body Parameters application/json
text
user_prompt
string
Prompt
Required
expand_prompt
boolean
Optional
Whether to enable prompt optimization
loop
boolean
// provider-specific example normalized for English documentation
Optional
image_url
string
Optional
Reference image, supports third-party image URLs and Base64
image_end_url
string
Optional
Key frame, supports third-party image URLs and Base64
notify_hook
string
Optional
Callback URL:
https://xxxxxxx
resolution
string
Optional
// provider-specific example normalized for English documentation
duration
string
Optional
// provider-specific example normalized for English documentation
model_name
enum<string>
Optional
Enum Values:
ray-v1
// provider-specific example normalized for English documentation
ray-v2
// provider-specific example normalized for English documentation
ray-v3
// provider-specific example normalized for English documentation
Example
{
"user_prompt"
:
"string"
,
"expand_prompt"
:
true
,
"loop"
:
true
,
"image_url"
:
"string"
,
"image_end_url"
:
"string"
,
"notify_hook"
:
"string"
,
"resolution"
:
"string"
,
"duration"
:
"string"
,
"model_name"
:
"ray-v1"
}Example Request
Shell
bash
curl --location --request POST '/luma/generations' \
--header 'Authorization: Bearer {{YOUR_API_KEY}}' \
--header 'Content-Type: application/json' \
--data-raw '{
"user_prompt": "string",
"expand_prompt": true,
"loop": true,
"image_url": "string",
"image_end_url": "string",
"notify_hook": "string",
"resolution": "string",
"duration": "string",
"model_name": "ray-v1"
}'Response
🟢 200 Success
Content Type: application/json
Response Schema
text
objectExample
json
{
"id": "9d4b7516-77e5-481a-b015-48313946f33b",
"prompt": "cat dance",
"state": "pending",
"created_at": "2024-07-01T07:35:13.498660Z",
"video": null,
"liked": null,
"estimate_wait_seconds": null
}