Skip to main content
POST
/
v1
/
videos
/
generations
curl --request POST \
  --url https://toapis.com/v1/videos/generations \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
    "model": "grok-video-3",
    "prompt": "A golden retriever running on a green field in sunny weather",
    "duration": 5,
    "aspect_ratio": "16:9"
  }'
{
  "id": "video_abc123def456",
  "object": "generation.task",
  "model": "grok-video-3",
  "status": "queued",
  "progress": 0,
  "created_at": 1768380224,
  "metadata": {}
}
  • Grok Video generation model
  • Select grok-video-3 model via the model parameter
  • Supports text-to-video and image-to-video
  • Async task management, query results via task ID
Important Change: For better performance and cost control, we no longer support passing base64 image data directly in image_urls. Please use the Upload Image API to upload images first, then call this API with the returned URL.

Authorizations

Authorization
string
required
All API requests require Bearer Token authenticationGet API Key: Visit the API Key Management Page to obtain your API KeyAdd to request headers:
Authorization: Bearer YOUR_API_KEY

Body

model
string
default:"grok-video-3"
required
Video generation model nameSupported models:
  • grok-video-3 - Grok video generation model
Example: "grok-video-3"
prompt
string
required
Text description for video generation
duration
integer
Video duration in secondsExample: 5 or 10
aspect_ratio
string
Video aspect ratioSupported formats:
  • 16:9 (landscape)
  • 9:16 (portrait)
image_urls
string[]
Array of reference image URLs for image-to-video generation⚠️ Only URL format is supported (base64 is no longer supported)
  • Publicly accessible image URLs (http:// or https://)
  • Use the Upload Image API to upload local images and get URLs

Response

id
string
Unique task identifier for querying task status
object
string
Object type, always generation.task
model
string
Model name used
status
string
Task status
  • queued - Waiting to be processed
  • in_progress - Processing
  • completed - Successfully completed
  • failed - Failed
progress
integer
Task progress percentage (0-100)
created_at
integer
Task creation timestamp (Unix timestamp)
metadata
object
Task metadata
curl --request POST \
  --url https://toapis.com/v1/videos/generations \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
    "model": "grok-video-3",
    "prompt": "A golden retriever running on a green field in sunny weather",
    "duration": 5,
    "aspect_ratio": "16:9"
  }'
{
  "id": "video_abc123def456",
  "object": "generation.task",
  "model": "grok-video-3",
  "status": "queued",
  "progress": 0,
  "created_at": 1768380224,
  "metadata": {}
}