GetToken Docs

GetToken Documentation

Learn Codex step by step, from core concepts and installation to GetToken API access, tool configuration, and troubleshooting.

View my API Key

Sign in, reveal your current GetToken API Key, then copy it into Codex or OpenCode.

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

  1. Logged in to the GetToken console.
  2. Created a video_api dedicated API key (from the Console → Video API page).
  3. Reviewed base_url and endpoint selection (see base_url & endpoint selection).

Endpoints

MethodPathPurpose
POST/v1/videos/generationsCreate a video generation task
POST/v1/videos/editsCreate an edit task from an existing video
POST/v1/videos/extensionsContinue generating from the end of a video
GET/v1/videos/{request_id}Query task status
GET/v1/videos/{request_id}/contentPlay or download the finished result

Models & Specs

ModelTypeSupported Resolutions
grok-imagine-videoText-to-video480p, 720p
grok-imagine-video-1.5Image-to-video480p, 720p, 1080p
  • Duration range: 1–15 seconds
  • Result retention: 24 hours; download promptly

Quick Start

bash
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.