DataEyesAI
Official SiteConsoleDocs HomeGetting StartedDeveloper ToolsAI Models API
Terms & Policies
Official SiteConsoleDocs HomeGetting StartedDeveloper ToolsAI Models API
Terms & Policies
  1. Grok Video Generation
  • API Overview
  • Chat Completions
  • Responses
  • Messages (Claude)
  • Gemini (generateContent)
  • Embeddings
  • Image Models
    • Images
    • Gemini Image Generation
    • Grok Imagine Image
  • Midjourney format
    • Midjourney API Reference
    • Task query interface
    • Upload image
    • Get seed (Seed)
    • Submit Imagine task
    • Query tasks based on ID list
    • FaceSwap
    • Execute Action operation
    • /mj/submit/blend
    • Submit Describe task
    • Submit Modal
    • Refresh link
    • Edit image
    • Query task status by task ID
    • Get the seed of the task image
  • Video Model
    • FLUX Video Generation (flux-3-video)
    • Grok Video Generation
      • 00-Overview
      • 01-Text-to-Video
      • 02-Image-to-Video
      • 03-Reference-to-Video
      • 04-Video-Editing
      • 05-Video-Extension
    • Seedance Video Generation
      • 00-Overview
      • 01-Create-Video-Generation-Task
      • 02-Query-Video-Generation-Task
      • 03-Query-Video-Generation-Task-List
      • 04-Cancel-or-Delete-Task
      • Seedance Private Asset Library API Documentation
    • MiniMax-H3 Video Generation
      • 00-Overview
      • 01-Create-Video-Generation
      • 02-Create-Video-Regeneration
      • 03-Create-H3-Context-IR
      • 04-Query-Task
      • 05-List-Tasks
      • 06-Cancel-or-Delete-Task
    • Hailuo Video Generation
      • 00-Overview
      • 01-Text-to-Video-T2V
      • 02-Image-to-Video-I2V
      • 03-First-Last-Frame-FL2V
      • 04-Subject-Reference-S2V
      • 05-Query-Task-Status
      • 06-Video-Download
      • 99-Appendix-Camera-Movement-and-Webhooks
    • Jimeng Video Generation
      • 00-Overview
      • 01-3.0-Pro-Video-Generation
      • 02-720P-Text-to-Video
      • 03-720P-Image-to-Video-First-Frame
      • 04-720P-Image-to-Video-Start-End-Frame
      • 05-720P-Image-to-Video-Camera
      • 06-1080P-Text-to-Video
      • 07-1080P-Image-to-Video-First-Frame
      • 08-1080P-Image-to-Video-Start-End-Frame
      • 09-Error-Codes
    • Kling AI Video Generation
      • 00-Overview
      • 01-Text-to-Video
      • 02-Image-to-Video
      • 03-Omni-Video
      • 04-Multi-Image-to-Video
      • 05-Motion-Control
      • 06-Multi-Elements
      • 07-Video-Extension
      • 08-Lip-Sync
      • 09-Avatar
      • 10-Text-to-Audio
      • 11-Video-to-Audio
      • 12-TTS
      • 13-Custom-Voices
      • 14-Image-Recognition
      • 15-Element-Management
      • 16-Video-Effects
      • 17-Kling-4.0-Video-Generation
    • Vidu Video Generation
      • 00-Overview
      • 01-Text-to-Video
      • 02-Image-to-Video
      • 03-Reference-to-Video
      • 04-Start-End-Frame
      • 05-Multi-Frame
      • 06-Scene-Template
      • 07-Template-Story
      • 08-Query-Tasks
    • HappyHorse
      • HappyHorse Text-to-Video
      • HappyHorse Image-to-Video (First Frame)
      • HappyHorse Reference-to-Video
      • HappyHorse Video Editing
    • Wan Video Generation
      • 00-Overview.md
      • 01-Text-to-Video
      • 02-Image-to-Video
      • 03-Reference-to-Video
      • 04-Video-Editing
      • 05-First-Last-Frame-to-Video
      • 06-Motion-Transfer-and-Character-Swap
      • 07-Digital-Human-Video
      • 08-VACE-Video-Editing
      • 09-Query-Task
  • Audio API
    • Audio API
    • Gemini TTS API
    • Google DeepMind Lyria API
    • Elevenlabs Speech to Text API Reference
  1. Grok Video Generation

02-Image-to-Video

Image-to-Video#

Doc version:v1.0.0 | Last updated:2026-06-11
This platform fully supports the Grok (xAI) official video generation API. Requests and responses are transparently proxied; parameter semantics are identical to the official API.
Generate video using an input image as the first frame, combined with a text prompt.

Create Task#

POST https://studio.dataeyes.ai/grok/v1/videos/generations

Request Headers#

ParameterTypeRequiredDefaultDescription
Content-TypestringYesapplication/jsonData exchange format
AuthorizationstringYesAuthentication, refer to API authorization

Request Body#

ParameterTypeRequiredDefaultDescription
modelstringYesgrok-imagine-videoModel identifier
promptstringYesText prompt for video generation
imagestringYesImage URL (public URL, Base64 data URL, or file_id from xAI Files API)
durationintegerNo8Video duration in seconds
Range:1-15
aspect_ratiostringNo16:9Output video aspect ratio
Options:1:1, 16:9, 9:16, 4:3, 3:4, 3:2, 2:3
Defaults to input image native aspect ratio; if specified, image is stretched to match
resolutionstringNo480pOutput video resolution
Options:480p, 720p

Request Example#

curl --request POST \
  --url 'https://studio.dataeyes.ai/grok/v1/videos/generations' \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
    "model": "grok-imagine-video",
    "prompt": "A glowing crystal-powered rocket launching from the red dunes of Mars",
    "image": "https://example.com/image.png",
    "duration": 10,
    "aspect_ratio": "16:9",
    "resolution": "720p"
  }'

Response Example#

{
  "request_id": "req_abc123def456"
}

Query Task#

GET https://studio.dataeyes.ai/grok/v1/videos/{request_id}
Poll task status and results using request_id.

Request Headers#

ParameterTypeRequiredDescription
AuthorizationstringYesBearer {API_KEY}

Request Example#

curl --request GET \
  --url 'https://studio.dataeyes.ai/grok/v1/videos/{request_id}' \
  --header 'Authorization: Bearer <token>'

Response Example#

Success (status: done):
{
  "status": "done",
  "video": {
    "url": "https://vidgen.x.ai/.../video.mp4",
    "duration": 10,
    "respect_moderation": true
  },
  "model": "grok-imagine-video"
}
Processing (status: pending):
{
  "status": "pending",
  "model": "grok-imagine-video"
}
Failed:
{
  "status": "failed",
  "error": {
    "code": "invalid_argument",
    "message": "Prompt cannot be empty. Please provide a prompt."
  }
}

Query Response Fields#

FieldTypeDescription
statusstringTask status:pending, done, failed, expired
video.urlstringTemporary URL of the generated video (valid 24 hours)
video.durationintegerDuration of the generated video (seconds)
video.respect_moderationbooleanWhether content passes moderation; if false, url is empty
modelstringModel used
error.codestringError code
error.messagestringError description

Error Handling#

When a video generation fails, the response includes an error object with code and message fields. The possible error codes are:
CodeMeaningAction
invalid_argumentInvalid request input (unsupported duration, invalid image/video, prompt too long, conflicting modes, or content blocked by moderation)Fix the request parameters or input media, then submit a new request
permission_deniedThe API key does not have permission for the requested operationVerify API key permissions
failed_preconditionThe operation is not available for the selected model or settingsChange the model, mode, resolution, or other settings
service_unavailableVideo generation is temporarily overloadedRetry the request later
internal_errorInternal service failureRetry the request; if persistent, contact support with the request_id
Authentication errors, missing models, and rate limits are returned synchronously as standard API errors before a video job is created.
Previous
01-Text-to-Video
Next
03-Reference-to-Video