APIMaster.ai

Grok Imagine Video 1.5 API

Call Grok Imagine Video 1.5 through APIMaster for text-to-video and image-to-video generation.

Grok Imagine Video 1.5

Use APIMaster's asynchronous video API with grok-imagine-video-1.5 for text-to-video and image-to-video generation.

Base URL: https://apimaster.ai/v1 (https://apimaster.ai/v1). Create a task with POST https://apimaster.ai/v1/videos/generations.

Submit a task

POST https://apimaster.ai/v1/videos/generations

Field Type Required Description
model string Yes grok-imagine-video-1.5
prompt string Yes Video description in English or Chinese
aspect_ratio string No Aspect ratio such as 16:9, 9:16, or 1:1; default 16:9
duration integer No Video length in seconds; defaults to 6
resolution string No 480p, 720p, or another currently available resolution; default 720p
image_urls string[] No Publicly accessible HTTP(S) reference image URLs

Text-to-video

curl -s "https://apimaster.ai/v1/videos/generations" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "grok-imagine-video-1.5",
    "prompt": "A dog running on a sunny beach, cinematic slow motion",
    "aspect_ratio": "16:9",
    "duration": 6,
    "resolution": "720p"
  }'

Image-to-video

curl -s "https://apimaster.ai/v1/videos/generations" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "grok-imagine-video-1.5",
    "prompt": "Animate the scene naturally with a gentle camera push-in",
    "image_urls": ["https://example.com/start.png"],
    "aspect_ratio": "16:9",
    "duration": 10,
    "resolution": "720p"
  }'

The submission response contains a task ID:

{
  "code": 200,
  "data": [{"task_id": "task_xxxxxxxx", "status": "submitted"}]
}

Check task status

GET https://apimaster.ai/v1/videos/{task_id}

curl -s "https://apimaster.ai/v1/videos/task_xxxxxxxx" \
  -H "Authorization: Bearer YOUR_API_KEY"

When complete, the response includes a video URL:

{
  "id": "task_xxxxxxxx",
  "status": "completed",
  "progress": "100%",
  "url": "https://apimaster.ai/v1/videos/task_xxxxxxxx/content"
}

Download

GET https://apimaster.ai/v1/videos/{task_id}/content

curl -L "https://apimaster.ai/v1/videos/task_xxxxxxxx/content" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -o output.mp4

Limits and errors

  • Durations below 6 seconds are normalized to 6 seconds; the current model card and response determine the available maximum and resolutions.
  • Each image_urls entry must be a public HTTP(S) URL.
  • 401 means an invalid API key, 402 means insufficient balance, and 429 means rate limiting.
  • For a failed task, read the error in the status response before attempting a download.