English home / Model hubs / Grok Imagine Video API: Prompt-to-Video and Image-to-Video
Video API · xAI · async jobs

Grok Imagine Video API: Prompt-to-Video and Image-to-Video

This hub focuses on the engineering details that make video API calls reliable: request payloads, task IDs, status polling, image inputs and final billing.

Model ID: grok-imagine-video·Duration or task rules; verify current console pricing·Updated 2026-09-27

When this model is a good fit

Grok Imagine Video is useful for short creative clips, image-to-video experiments and workflows that can tolerate asynchronous completion. Build the client around task state instead of assuming an immediate video URL.

Best for

  • Short prompt-to-video clips
  • Image-to-video prototypes
  • Automated polling and asset hand-off

Check before production

  • Confirm the input image URL is reachable
  • Persist task ID and request ID
  • Separate generation success from download success

What this page does not guarantee

A successful task does not guarantee that your own storage or download step succeeded. Retry the download before creating a new generation task.

How to choose this hub

Choose this route when you want to keep video exploration on the main-site gateway and can build a small asynchronous worker around it. A useful test compares completed clips, not just the fastest response received.

Option to compareChoose it whenMeasure before switching
Seedance 2.5You want a separate video-focused workflow and can manage a separate account.Duration, terminal success rate and final task charge
Image generation onlyA still image already satisfies the deliverable.Whether motion adds measurable conversion or review value
A local rendering pipelineYou need deterministic frames or private assets.Infrastructure cost, render time and operator effort

Production workflow

  1. Start with a public, reachable input image only when the route supports image-to-video.
  2. Submit one short task and persist both task ID and request ID.
  3. Poll with bounded intervals and stop only at a documented terminal state.
  4. Separate provider-side completion, file download and storage validation into three checks.

Pricing and billing

Video billing can depend on duration, model route and output options. Use public values only for a rough budget and reconcile every successful task in the console.

For a first test, create one short job, poll it to completion, download it, and compare the final ledger entry before enabling concurrency.

Minimal API request

Use the shared gateway and keep the model ID in configuration. Start with a small request, save the request ID, and compare usage with the dashboard before increasing concurrency.

curl https://www.gpt345.com/v1/videos/generations   -H "Authorization: Bearer $GPT345_API_KEY"   -H "Content-Type: application/json"   -d '{"model":"grok-imagine-video","content":[{"type":"text","text":"A slow cinematic camera move across a bright product studio"}],"duration":6}'

Acceptance checklist

  1. The task status progresses beyond queued or running.
  2. The final response contains a usable video URL.
  3. A failed generation is not confused with a local download failure.

Frequently asked questions

Is video generation synchronous?

Usually no. Save the task ID and poll until a terminal status.

Can I use a first frame?

Use it only when the currently selected route documents image input and the URL is publicly reachable.

How do I avoid duplicate charges?

Use an idempotency key where supported and never blindly resubmit after a timeout.