Video models
Grok Imagine
On this page
Grok Imagine — high-quality AI video generation.
| modelId | grok-imagine-image-to-video, grok-imagine-text-to-video, grok-imagine-text-to-image, grok-imagine-image-to-image, grok-imagine-extend, grok-imagine-upscale |
| Modality | video |
| Pricing | See this model on the Pricing page for the current per-call price (with your markup). |
Operations
| Operation | modelId | Endpoint | Required input |
|---|---|---|---|
| Image To Video | grok-imagine-image-to-video | POST /api/v1/generate | — |
| Text To Video | grok-imagine-text-to-video | POST /api/v1/generate | prompt |
| Text To Image | grok-imagine-text-to-image | POST /api/v1/generate | prompt |
| Image To Image | grok-imagine-image-to-image | POST /api/v1/generate | image_urls |
| Extend | grok-imagine-extend | POST /api/v1/generate | task_id, prompt, extend_at, extend_times |
| Upscale | grok-imagine-upscale | POST /api/v1/generate | task_id |
| Poll task | — | GET /api/v1/task/{id}?model=grok-imagine-image-to-video | — |
Image To Video — grok-imagine-image-to-video
| Field | Type | Required | Values / example |
|---|---|---|---|
| image_urls | string[] | No | Provide one external image URL as a reference for video generation (only one image is supported). This is one of two image input options — you can either upload an external image or specify a task_id + index from a Grok-generated image below. Do not provide both image_urls and task_id at the same time.In your prompt, reference an uploaded image by typing @image(n) followed by a space (for example: @image1 a sunset over the ocean). (image URL) |
| task_id | string | No | Enter the task_id of an image previously generated with the Grok model on you.bot. Use it together with the index below to select a specific image from that generation. When using this method, do not provide image_urls. Unlike external images, this method supports Spicy mode. Max 100 characters. |
| index | number | No | When using a task_id, specify which image to use (Grok generates 6 images per task). This parameter only works with task_id and is ignored if image_urls is used(0-based). (range 0-5) (default: 0) |
| prompt | string | No | The text prompt describing the desired video motion Max 5000 characters. (default: Slow cinematic push-in with gentle ambient motion, soft light shifting across the frame, subtle parallax and a shallow, dreamlike depth of field.) |
| mode | string | No | Note: When generating videos using external image inputs, Spicy mode is not supported and will automatically switch to Normal. (options: fun | normal | spicy) (default: normal) |
| aspect_ratio | string | No | The aspect ratio of the video. This parameter is invalid if it is a single image. (options: 2:3 | 3:2 | 1:1 | 16:9 | 9:16) (default: 2:3) |
| duration | number | No | The duration of the generated video in seconds (range 6-30) (default: 6) |
| resolution | string | No | Resolution of the generated video (options: 480p | 720p) (default: 480p) |
| nsfw_checker | boolean | No | A configurable parameter. Defaults to true in the Playground. (true/false) (default: true) |
bash
curl -X POST https://you.bot/api/v1/generate \
-H "Authorization: Bearer $YOUBOT_API_KEY" \
-H "Content-Type: application/json" \
-d '{"modelId":"grok-imagine-image-to-video","input":{"image_urls":["https://example.com/input.jpg"],"task_id":"example","index":0,"prompt":"A cinematic aerial shot of a coastal town at golden hour, gentle waves rolling onto the shore, warm light, slow camera push-in.","mode":"normal","aspect_ratio":"2:3","duration":6,"resolution":"480p","nsfw_checker":true}}'Text To Video — grok-imagine-text-to-video
| Field | Type | Required | Values / example |
|---|---|---|---|
| prompt | string | Yes | The text prompt describing the desired video motion Max 5000 characters. (default: A tram glides through a flooded neon city at night, reflections rippling around it, cinematic wide shot.) |
| aspect_ratio | string | No | Specifies the width-to-height ratio of the generated content. Controls the aspect ratio of the output video. (options: 2:3 | 3:2 | 1:1 | 9:16 | 16:9) (default: 2:3) |
| mode | string | No | Options: fun | normal | spicy (default: normal) |
| duration | number | No | The duration of the generated video in seconds (range 6-30) (default: 6) |
| resolution | string | No | Resolution of the generated video (options: 480p | 720p) (default: 480p) |
| nsfw_checker | boolean | No | A configurable parameter. Defaults to true in the Playground. (true/false) (default: true) |
bash
curl -X POST https://you.bot/api/v1/generate \
-H "Authorization: Bearer $YOUBOT_API_KEY" \
-H "Content-Type: application/json" \
-d '{"modelId":"grok-imagine-text-to-video","input":{"prompt":"A cinematic aerial shot of a coastal town at golden hour, gentle waves rolling onto the shore, warm light, slow camera push-in.","aspect_ratio":"2:3","mode":"normal","duration":6,"resolution":"480p","nsfw_checker":true}}'Text To Image — grok-imagine-text-to-image
| Field | Type | Required | Values / example |
|---|---|---|---|
| prompt | string | Yes | Text value Max 5000 characters. (default: Cinematic portrait of a jazz drummer mid-solo in a smoky club, rim lighting, shallow depth of field.) |
| aspect_ratio | string | No | Specifies the width-to-height ratio of the generated content. Controls the aspect ratio of the output image (options: 2:3 | 3:2 | 1:1 | 9:16 | 16:9) (default: 3:2) |
| enable_pro | boolean | No | Toggle for request processing mode. false enables speed mode (prioritizes low latency); true enables quality mode (prioritizes output quality). (true/false) (default: false) |
bash
curl -X POST https://you.bot/api/v1/generate \
-H "Authorization: Bearer $YOUBOT_API_KEY" \
-H "Content-Type: application/json" \
-d '{"modelId":"grok-imagine-text-to-image","input":{"prompt":"A photorealistic portrait of a red fox in a snowy forest, soft morning light, shallow depth of field, 85mm.","aspect_ratio":"3:2","enable_pro":false}}'Image To Image — grok-imagine-image-to-image
| Field | Type | Required | Values / example |
|---|---|---|---|
| prompt | string | No | A text description specifying the desired content or style of the generated image. Max 390000 characters. (default: Restyle into a rain-soaked cyberpunk alley at midnight, wet cobblestones mirroring towering neon signage in magenta and cyan, steam curling up from the grates, moody cinematic color grade.) |
| image_urls | string[] | Yes | An array containing up to 1 URL string pointing to reference images. In your prompt, reference the uploaded image by typing @image(n) followed by a space (for example: @image1 a sunset over the ocean). (image URL) |
| nsfw_checker | boolean | No | A configurable parameter. Defaults to true in the Playground. (true/false) (default: true) |
bash
curl -X POST https://you.bot/api/v1/generate \
-H "Authorization: Bearer $YOUBOT_API_KEY" \
-H "Content-Type: application/json" \
-d '{"modelId":"grok-imagine-image-to-image","input":{"prompt":"A photorealistic portrait of a red fox in a snowy forest, soft morning light, shallow depth of field, 85mm.","image_urls":["https://example.com/input.jpg"],"nsfw_checker":true}}'Extend — grok-imagine-extend
| Field | Type | Required | Values / example |
|---|---|---|---|
| task_id | string | Yes | supports only you.bot AI–generated taskid Max 100 characters. |
| prompt | string | Yes | The text prompt describing the desired video motion Max 5000 characters. (default: A potter's hands draw a spinning lump of clay upward into a tall vessel, water glistening on the walls as the camera orbits slowly around the wheel and afternoon light rakes across a dusty workshop.) |
| extend_at | number | Yes | Extension start time must be at least 2 seconds. (default: 2) |
| extend_times | string | Yes | Extended duration (options: 6 | 10) (default: 6) |
bash
curl -X POST https://you.bot/api/v1/generate \
-H "Authorization: Bearer $YOUBOT_API_KEY" \
-H "Content-Type: application/json" \
-d '{"modelId":"grok-imagine-extend","input":{"task_id":"example","prompt":"A cinematic aerial shot of a coastal town at golden hour, gentle waves rolling onto the shore, warm light, slow camera push-in.","extend_at":2,"extend_times":"6"}}'Upscale — grok-imagine-upscale
| Field | Type | Required | Values / example |
|---|---|---|---|
| task_id | string | Yes | supports only you.bot AI–generated taskid Max 100 characters. |
bash
curl -X POST https://you.bot/api/v1/generate \
-H "Authorization: Bearer $YOUBOT_API_KEY" \
-H "Content-Type: application/json" \
-d '{"modelId":"grok-imagine-upscale","input":{"task_id":"example"}}'