Generate a video
generate_videoCreates videos from text prompts or reference images using Veo 3.1, Grok Imagine, or Omni Flash. Handles long generations by returning a task ID for later status checks.
Instructions
Generate a video with Veo 3.1, Grok Imagine or Omni Flash. Generation usually takes 1-5 minutes, longer than a tool call can wait — if it is still running when the wait budget runs out, this returns a task id to check later with check_job. Supports text-to-video and image-to-video (pass reference_images).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| size | No | Pixel size as "WxH", e.g. "1280x720". Aspect ratio is inferred from it. | |
| tier | No | Resolution tier. Worth setting: pricing is per tier, and a size matching no tier falls back to the model's base rate. | |
| model | No | Which video model to use. | veo_3_1 |
| prompt | Yes | What the video should show. | |
| seconds | No | Clip length in seconds (default 4). | |
| reference_images | No | HTTPS or data: URLs to guide generation (image-to-video). |