Skip to main content
POST
/
kyyReactApiServer
/
v1
/
grok
/
videos
curl --request POST \
  --url https://zcbservice.aizfw.cn/kyyReactApiServer/v1/grok/videos \
  --header 'Authorization: Bearer {{key}}' \
  --header 'Content-Type: application/json' \
  --data '{
    "model": "grok_video3",
    "prompt": "A cat dancing in the rain, cinematic style",
    "duration": 10,
    "aspect_ratio": "16:9",
    "resolution": "720p"
  }'
{
  "id": "video_fd35ee52-2a98-44a6-b930-29a88ce9b8fd",
  "object": "video",
  "created": 1774836724,
  "model": "grok_video3",
  "status": "queued",
  "error": null
}

Grok Create Video Task

Create video generation tasks using Grok’s AI model, supporting text-to-video and image-to-video modes.

Authentication

All requests require a Bearer token in the request header:
Authorization: Bearer {{key}}

Model Introduction

Supported models:
  • grok_video3: Variable duration 6-30 seconds, supports 480p/720p resolution, billed per second
  • grok_video3_pro: Fixed 10 seconds, does not support specifying resolution

Request Parameters

model
string
required
Model nameAvailable values:
  • grok_video3 - Variable duration 6-30 seconds (billed per second)
  • grok_video3_pro - Fixed 10 seconds
prompt
string
required
Video generation prompt describing the desired video contentExample: "A cat dancing in the rain, cinematic style"
duration
integer
Video duration (seconds)
  • grok_video3: Supports 6-30 seconds, default 6 seconds
  • grok_video3_pro: Fixed 10 seconds (no need to set)
aspect_ratio
string
Output video aspect ratio, default is 16:9Supported values:
  • 16:9 - Landscape
  • 9:16 - Portrait
  • 1:1 - Square
  • 3:2 - Standard landscape
  • 2:3 - Standard portrait
resolution
string
Output resolution, default is 480pSupported values:
  • 480p - Standard definition (default)
  • 720p - High definition
Only grok_video3 supports resolution selection

Image-to-Video Mode

image_urls
array
Reference image URL array (for image-to-video scenarios)
  • grok_video3: Supports up to 7 reference images
  • grok_video3_pro: Supports reference images
Format requirements: jpeg, png, webp Value type: Public URL arrayExample: ["https://example.com/image1.jpg", "https://example.com/image2.jpg"]

Response Parameters

id
string
Unique identifier of the video generation task, used to query task status later
object
string
Object type, fixed as video
created
integer
Task creation timestamp
model
string
Model name used
status
string
Task status:
  • queued - In queue
  • processing - Processing
  • completed - Completed
  • failed - Failed
error
string
Error message, returned when status is failed

Use Cases

Text-to-Video

Generate video using only a prompt, no image guidance needed

Image-to-Video

Use reference images to guide video generation, supports up to 7 images

Grok Features

Flexible Duration

grok_video3 supports adjustable video duration from 6-30 seconds

Multiple Aspect Ratios

Supports 5 common video aspect ratios

Resolution Selection

grok_video3 supports 480p and 720p resolutions

Multiple Reference Images

grok_video3 supports up to 7 reference images

Model Comparison

Featuregrok_video3grok_video3_pro
Duration6-30 seconds adjustableFixed 10 seconds
Resolution480p / 720pNot configurable
BillingPer secondPer task
Reference ImagesUp to 7Supported
Best Practices:
  1. Video generation is asynchronous, you need to query task status and results using the returned id
  2. Clearly describe the desired visual effects and style in the prompt
  3. Choose the appropriate model:
    • grok_video3: Flexible duration, billed per second, suitable for different duration needs
    • grok_video3_pro: Fixed 10 seconds, suitable for standard duration scenarios
  4. Image URLs must be publicly accessible
  5. Use reference images reasonably, too many images may affect generation quality
Scenario Selection Tips:
  • Text-to-Video: Fully AI-created, suitable for creative exploration
  • Image-to-Video: Generated based on reference images, suitable for scenarios with clear style or content references
  • Multiple Image Reference: Use multiple images to provide richer visual guidance
curl --request POST \
  --url https://zcbservice.aizfw.cn/kyyReactApiServer/v1/grok/videos \
  --header 'Authorization: Bearer {{key}}' \
  --header 'Content-Type: application/json' \
  --data '{
    "model": "grok_video3",
    "prompt": "A cat dancing in the rain, cinematic style",
    "duration": 10,
    "aspect_ratio": "16:9",
    "resolution": "720p"
  }'
{
  "id": "video_fd35ee52-2a98-44a6-b930-29a88ce9b8fd",
  "object": "video",
  "created": 1774836724,
  "model": "grok_video3",
  "status": "queued",
  "error": null
}