Tool Configuration
Video Generation API Guide
Call the Grok video generation API through GetToken relay for text-to-video, image-to-video, editing, and extension tasks.
- Updated
- Last verified
- Maintained by
- GetToken Docs Team
GetToken provides a Grok-based video generation relay supporting text-to-video, image-to-video, video editing, and video extension. All endpoints live under /v1/videos and require a dedicated service_type=video_api API key.
Prerequisites
- Logged in to the GetToken console.
- Created a
video_apidedicated API key (from the Console → Video API page). - Reviewed base_url and endpoint selection (see base_url & endpoint selection).
Endpoints
| Method | Path | Purpose |
|---|---|---|
| POST | /v1/videos/generations | Create a video generation task |
| POST | /v1/videos/edits | Create an edit task from an existing video |
| POST | /v1/videos/extensions | Continue generating from the end of a video |
| GET | /v1/videos/{request_id} | Query task status |
| GET | /v1/videos/{request_id}/content | Play or download the finished result |
Models & Specs
| Model | Type | Supported Resolutions |
|---|---|---|
grok-imagine-video | Text-to-video | 480p, 720p |
grok-imagine-video-1.5 | Image-to-video | 480p, 720p, 1080p |
- Duration range: 1–15 seconds
- Result retention: 24 hours; download promptly
Quick Start
curl https://api.gettoken.dev/v1/videos/generations \
-H "Authorization: Bearer YOUR_VIDEO_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "grok-imagine-video",
"prompt": "A quiet city street after rain",
"resolution": "720p",
"duration": 8
}'
After receiving the request_id, poll the status endpoint until the task completes, then call the content endpoint to retrieve the video.
Pricing
Video is billed by actual generated duration. See the Console → Video API page for real-time quotes. You can estimate cost by model, resolution, and duration before submitting a task.
Notes
- Video keys are managed separately from text and image keys; do not mix them.
- Status and content queries must use the same key that created the task.
- Cancellation, batch generation, and multi-reference images are not currently supported.