Create video
Grok Imagine text/image-to-video (POST /v1/videos/generations). xAI native JSON entry; poll via GET /v1/videos/{id}.
POST
/v1/videos/generationsBody Parametersapplication/json
aspect_ratio* string
("1:1" | "16:9" | "9:16")
duration* integer
[1, 15]
image object
Cannot be used with reference_images
properties url* string
Resource URL
model* string
grok-imagine-video、grok-imagine-video-1.5-preview
prompt* string
prompt word
reference_images array
Cannot be used with reference_images
items object object
resolution* string
("480p" | "720p")
Responses
200 application/json
response-200 object
400 Bad request or validation failed application/json
response-400 object
properties error* object
401 Missing or invalid API Key application/json
response-401 object
1{
2"aspect_ratio": "string",
3"duration": 0,
4"model": "string",
5"prompt": "string",
6"resolution": "string"
7}
1curl -X POST "https://api.digislash.com/v1/videos/generations" \
2-H "Authorization: Bearer <API Key>" \
3-H "Content-Type: application/json" \
4-d '{
5"aspect_ratio": "string",
6"duration": 0,
7"model": "string",
8"prompt": "string",
9"resolution": "string"
10}'
1▼{
2"aspect_ratio": "16:9",
3"duration": 4,
4"model": "grok-imagine-video",
5"prompt": "A serene lake at sunrise with mist rolling over the water",
6"resolution": "480p"
7}
