Grok Imagine Video 1.5 API
Complete API reference for Grok Imagine Video 1.5 generation models by xAI.
Model Variants
This API supports one model variant:
Supported Aspect Ratios
Resolution Options
Grok Imagine 1.5 Image to Video
Endpoint
POST /api/v1/video/task
Request Parameters
Required
Optional
Example Request
const response = await fetch('https://api.flaq.ai/api/v1/video/task', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json'
},
body: JSON.stringify({
model_name: 'grok-imagine-v1.5-image-to-video',
image_url: 'https://example.com/reference.jpg',
prompt: 'Subtle camera motion, subject holds pose',
aspect_ratio: '16:9',
duration: 10,
resolution: '720p'
})
});
const { data } = await response.json();
const taskId = data.task_id;
Body-only example:
{
model_name: 'grok-imagine-v1.5-image-to-video',
image_url: 'https://example.com/reference.jpg',
prompt: 'Subtle camera motion, subject holds pose',
aspect_ratio: '16:9',
duration: 10,
resolution: '720p'
}
Initial Response
Returns a task_id for polling:
{
"code": 0,
"message": "success",
"data": {
"task_id": "{task_id}",
"response_url": "https://api.flaq.ai/api/v1/video/{task_id}",
"task_status": "submitted"
}
}
Polling Response
Poll GET /api/v1/video/{taskId} to check status:
{
"code": 0,
"message": "success",
"data": {
"task_id": "{task_id}",
"response_url": "https://api.flaq.ai/api/v1/video/{task_id}",
"task_status": "succeed",
"task_status_msg": null,
"task_result": {
"videos": [
{
"url": "https://example.com/generated-video.mp4"
}
]
}
}
}
Status Values
submitted: Task accepted and waiting to be processed
processing: Video generation in progress
succeed: Video generation completed
failed: Video generation failed
Processing Time
Typical processing time: 2-5 minutes.
Best Practices
- Motion Description: Include camera movement and subject motion in prompts
- Image Quality: Use high-quality input images for better animation results
- Aspect Ratio: Match
aspect_ratio to your target output format before submitting