> ## Documentation Index
> Fetch the complete documentation index at: https://docs.myrouter.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Grok Imagine text to video 

This is an async API that only returns the `task_id` of the async task.

<Tip>
  This is an **async** API that only returns the task\_id of the async task. Use the task\_id to call the [Get Async Task Result API](/docs/models/reference-get-async-task-result) to retrieve the generated result.
</Tip>

## Request Headers

<ParamField header="Content-Type" type="string" required={true}>
  Enum: `application/json`
</ParamField>

<ParamField header="Authorization" type="string" required={true}>
  Bearer authentication format: Bearer \{\{API Key}}.
</ParamField>

## Request Body

<ParamField body="prompt" type="string" required={true}>
  Text description of the video to generate. Supports rich, detailed prompts for high-quality video generation across multiple styles, including cinematic scenes, natural landscapes, character animations, and more.

  Length limit: 1 - 4096
</ParamField>

<ParamField body="duration" type="integer" default={6}>
  Video duration in seconds (6-10). Longer videos cost more and are billed per second.

  Range: \[6, 10]
</ParamField>

<ParamField body="resolution" type="string" default="720p">
  Output video resolution. 720p provides higher quality; 480p generates faster.

  Possible values: `720p`, `480p`
</ParamField>

<ParamField body="aspect_ratio" type="string" default="16:9">
  Aspect ratio of the generated video. 16:9 for widescreen, 9:16 for mobile portrait, 1:1 for social media.

  Possible values: `16:9`, `1:1`, `9:16`
</ParamField>

## Response

<ResponseField name="task_id" type="string" required={true}>
  Use the task\_id to call the [Get Async Task Result API](/docs/models/reference-get-async-task-result) to retrieve the generated output.
</ResponseField>
