GlobalAiOpc

Grok - Create Task

Create video generation tasks using Grok models for text-to-video and image-to-video

POST/kyyReactApiServer/v1/grok/videos

Grok Create Video Task

Create video generation tasks using Grok models for text-to-video and image-to-video use cases.

Authentication

Authentication

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

Base URL

https://zcbservice.aizfw.cn/kyyReactApiServer
baseUrl is the shared prefix for all public APIs. The api field in the current page frontmatter shows the full endpoint. Use this baseUrl as the common prefix when reading or composing request paths.

Model overview

Supported models:
  • grok_video3: Variable duration from 6-30 seconds, supports 480p / 720p, defaulting to 10 seconds + 16:9 + 720p
  • grok_video3_pro: Fixed 10 second output, handled by default with 16:9 + 720p
  • grok_video3_max: Supports 6 / 10 / 12 / 16 / 20 / 30 seconds, supports 480p / 720p, defaults to 10 seconds + 16:9 + 720p
  • grok_video3_stable: Fixed 10 second output, supports 720p only, defaults to 16:9

Request parameters

modelbodystringrequired
Model name.
Available values:
  • grok_video3 - Variable duration from 6-30 seconds
  • grok_video3_pro - Fixed 10 second output
  • grok_video3_max - More fixed duration choices and stricter image constraints
  • grok_video3_stable - Fixed 10 second output, supports 720p only
promptbodystringrequired
Prompt describing the video you want to generate.
Example: "A cat dancing in the rain, cinematic style"
durationbodyinteger
Video duration in seconds.
Rules:
  • grok_video3: supports 6-30; default is 10
  • grok_video3_pro: fixed at 10, so you do not need to send it
  • grok_video3_max: only supports 6, 10, 12, 16, 20, 30; default is 10
  • grok_video3_stable: fixed at 10; omit it or send 10
aspect_ratiobodystring
Output aspect ratio.
Rules:
  • grok_video3: supports 16:9, 9:16, 1:1, 3:2, 2:3; default is 16:9
  • grok_video3_pro: defaults to 16:9
  • grok_video3_max: only supports 16:9, 9:16, 1:1; default is 16:9
  • grok_video3_stable: supports 16:9, 9:16, 3:2, 2:3, 1:1; default is 16:9
resolutionbodystring
Output resolution.
Rules:
  • grok_video3: supports 480p and 720p; default is 720p
  • grok_video3_pro: handled by default as 720p
  • grok_video3_max: supports 480p and 720p; default is 720p
  • grok_video3_stable: supports 720p only; omit it or send 720p
image_urlsbodyarray
Reference image URL array for image-to-video scenarios.
Rules:
  • grok_video3: up to 7 reference images
  • grok_video3_pro: supports reference images
  • grok_video3_max: up to 5 public URLs
  • grok_video3_stable: up to 7 public URLs
Example: ["https://example.com/image1.jpg", "https://example.com/image2.jpg"]

Response parameters

idstring
Unique identifier of the video generation task. Use it to query task status later.
objectstring
Object type. Always video.
createdinteger
Task creation timestamp.
modelstring
Model name used to create the task.
statusstring
Task status. On successful creation, it is always queued.
errorstring
Error information. It is usually null when task creation succeeds.

Parameter notes

Key constraints:
  • Omit image_urls for text-to-video
  • Send image_urls for image-to-video
  • grok_video3_max has the strictest validation for aspect ratio, duration, and resolution, so use supported values directly
  • grok_video3_stable only accepts publicly accessible reference image URLs, not base64 content

Model comparison

Featuregrok_video3grok_video3_progrok_video3_maxgrok_video3_stable
Duration6-30 seconds, default 10Fixed 10 seconds6 / 10 / 12 / 16 / 20 / 30 seconds, default 10Fixed 10 seconds
Ratio16:9 / 9:16 / 1:1 / 3:2 / 2:3Default 16:916:9 / 9:16 / 1:1, default 16:916:9 / 9:16 / 3:2 / 2:3 / 1:1, default 16:9
Quality480p / 720p, default 720pDefault 720p480p / 720p, default 720p720p only
Reference imagesUp to 7Compatible with reference image inputUp to 5 public URLsUp to 7 public URLs
Best practices:
  1. The create API returns a task object. Save its id for follow-up queries.
  2. Make prompts specific about subject, action, camera movement, and style.
  3. If you use grok_video3_max, prefer high-quality public image URLs.
  4. If you use grok_video3_stable, all reference images must be publicly accessible URLs.
  5. More reference images usually mean longer queue and generation times.