curl --request POST \
--url https://api.maxapi.io/api/v1/task/submit \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"model": "grok-imagine/text-to-video",
"callBackUrl": "https://example.com/webhook",
"input": {
"prompt": "A dog surfing a giant wave at golden hour, cinematic",
"duration": 10,
"ratio": "16:9",
"resolution": "720p",
"mode": "normal"
}
}'
{
"code": 0,
"msg": "ok",
"data": {
"taskId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
}
}
Grok Imagine Text-to-Video — Generate videos from a text prompt (xAI)
curl --request POST \
--url https://api.maxapi.io/api/v1/task/submit \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"model": "grok-imagine/text-to-video",
"callBackUrl": "https://example.com/webhook",
"input": {
"prompt": "A dog surfing a giant wave at golden hour, cinematic",
"duration": 10,
"ratio": "16:9",
"resolution": "720p",
"mode": "normal"
}
}'
{
"code": 0,
"msg": "ok",
"data": {
"taskId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
}
}
Create short videos from a text prompt using xAI’s Grok Imagine Video.Documentation Index
Fetch the complete documentation index at: https://docs.maxapi.io/llms.txt
Use this file to discover all available pages before exploring further.
grok-imagine/text-to-video — $0.007 per second of generated video.
duration: 6, 10, 12, 16, 20 secondsratio: 1:1, 16:9, 9:16resolution: 480p, 720pmode: fun, normal, spicy, customgrok-imagine/text-to-video.Hide properties
curl --request POST \
--url https://api.maxapi.io/api/v1/task/submit \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"model": "grok-imagine/text-to-video",
"callBackUrl": "https://example.com/webhook",
"input": {
"prompt": "A dog surfing a giant wave at golden hour, cinematic",
"duration": 10,
"ratio": "16:9",
"resolution": "720p",
"mode": "normal"
}
}'
{
"code": 0,
"msg": "ok",
"data": {
"taskId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
}
}