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

# Grok Imagine Text to Video

> Create six- or ten-second video scenes with Grok Imagine, using text to guide the action in square, portrait, or landscape formats.

<Tip>
  1. Submit the request with `VIDGO_API_KEY`. A `task_id` is returned immediately. Keep it until the task reaches `finished` or `failed`.
  2. Use [Query Task Status](/api-manual/task-management/status) to retrieve the result. If you provide a `callback_url`, Vidgo sends the result to your [webhook](/api-manual/task-management/webhooks) when the task finishes or fails.
</Tip>

# Grok Imagine Text to Video

Create six- or ten-second video scenes with Grok Imagine, using text to guide the action in square, portrait, or landscape formats.

## Available Models

* **xai/grok-imagine-video/text-to-video** - Generate video scenes from text prompts.

## Duration Options

* **6, 10 seconds** - Set `duration` as an integer. Optional; defaults to `6`.

## Key Features

* Generate video scenes from text prompts.

## Advanced Parameters

Set `model` and optional `callback_url` at the request root. Place all workflow parameters, including output options, inside `input`.

Use the input fields listed below.

### Prompt

* `prompt`: Required. Describe the scene and desired motion. Length: **1-5,000 characters**.

### Aspect Ratio

* `aspect_ratio`: Optional. Accepted values: `1:1`, `2:3`, `3:2`, `16:9`, `9:16`.

### Mode

* `mode`: Optional. Accepted values: `fun`, `normal`, `spicy`.


## OpenAPI

````yaml api-manual/video-series/xai-grok-imagine-video-text-to-video.json POST /api/generate/submit
openapi: 3.0.0
info:
  title: Vidgo API - Grok Imagine Text to Video
  description: >-
    Create six- or ten-second video scenes with Grok Imagine, using text to
    guide the action in square, portrait, or landscape formats.
  version: 1.0.0
servers:
  - url: https://api.vidgo.ai
security:
  - BearerAuth: []
paths:
  /api/generate/submit:
    post:
      tags:
        - Video Series
      summary: Grok Imagine Text to Video
      description: Submit a text prompt using the parameters below to generate a video.
      operationId: submit_xai_grok_imagine_video_text_to_video
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - model
                - input
              additionalProperties: true
              properties:
                model:
                  type: string
                  example: xai/grok-imagine-video/text-to-video
                input:
                  type: object
                  required:
                    - prompt
                  properties:
                    prompt:
                      type: string
                      maxLength: 5000
                      minLength: 1
                      description: >-
                        Describe the desired scene and motion. Enter 1–5,000
                        characters.
                    aspect_ratio:
                      type: string
                      enum:
                        - '1:1'
                        - '2:3'
                        - '3:2'
                        - '16:9'
                        - '9:16'
                      description: >-
                        Optional video aspect ratio: 1:1, 2:3, 3:2, 16:9, or
                        9:16.
                    mode:
                      type: string
                      enum:
                        - fun
                        - normal
                        - spicy
                      description: Generation style. Choose fun, normal, or spicy.
                    duration:
                      type: integer
                      enum:
                        - 6
                        - 10
                      description: >-
                        Video duration in seconds. Choose 6 or 10; defaults to
                        6.
                      default: 6
                  additionalProperties: false
                callback_url:
                  type: string
                  nullable: true
                  description: >-
                    Optional public HTTP(S) endpoint for task completion
                    notifications. HTTPS is recommended. Omit, use null, or use
                    an empty string to disable callbacks.
              description: >-
                Set model and callback_url at the request root. Place generation
                parameters inside input.
            examples:
              basic:
                summary: Basic workflow
                value:
                  model: xai/grok-imagine-video/text-to-video
                  input:
                    duration: 6
                    prompt: >-
                      A quiet forest under soft morning light, with natural
                      detail.
              callback:
                summary: Receive a completion callback
                value:
                  model: xai/grok-imagine-video/text-to-video
                  input:
                    duration: 6
                    prompt: >-
                      A quiet forest under soft morning light, with natural
                      detail.
                  callback_url: https://your-domain.com/callback
      responses:
        '200':
          description: Task submitted
          content:
            application/json:
              schema:
                type: object
                required:
                  - code
                  - data
                properties:
                  code:
                    type: integer
                    enum:
                      - 200
                  data:
                    type: object
                    required:
                      - task_id
                      - status
                      - created_time
                    properties:
                      task_id:
                        type: string
                      status:
                        type: string
                        enum:
                          - not_started
                          - running
                          - finished
                          - failed
                      created_time:
                        type: string
                        format: date-time
              example:
                code: 200
                data:
                  task_id: task-unified-example
                  status: running
                  created_time: '2026-09-10T08:00:00'
        '400':
          description: Review the input values, media accessibility, and account balance.
          content:
            application/json:
              schema:
                type: object
                required:
                  - detail
                properties:
                  detail:
                    oneOf:
                      - type: string
                      - type: object
                        additionalProperties: true
                      - type: array
                        items: {}
        '401':
          description: Invalid credentials
          content:
            application/json:
              schema:
                type: object
                required:
                  - detail
                properties:
                  detail:
                    oneOf:
                      - type: string
                      - type: object
                        additionalProperties: true
                      - type: array
                        items: {}
        '403':
          description: Access denied
          content:
            application/json:
              schema:
                type: object
                required:
                  - detail
                properties:
                  detail:
                    oneOf:
                      - type: string
                      - type: object
                        additionalProperties: true
                      - type: array
                        items: {}
        '404':
          description: Unknown or disabled model
          content:
            application/json:
              schema:
                type: object
                required:
                  - detail
                properties:
                  detail:
                    oneOf:
                      - type: string
                      - type: object
                        additionalProperties: true
                      - type: array
                        items: {}
        '408':
          description: Request timed out
          content:
            text/plain:
              schema:
                type: string
              example: Request timeout
        '422':
          description: Invalid JSON or non-object request body
          content:
            application/json:
              schema:
                type: object
                required:
                  - detail
                properties:
                  detail:
                    oneOf:
                      - type: string
                      - type: object
                        additionalProperties: true
                      - type: array
                        items: {}
        '429':
          description: Rate or API key credit limit exceeded
          content:
            application/json:
              schema:
                type: object
                required:
                  - detail
                properties:
                  detail:
                    oneOf:
                      - type: string
                      - type: object
                        additionalProperties: true
                      - type: array
                        items: {}
        '500':
          description: Internal error
          content:
            application/json:
              schema:
                type: object
                required:
                  - detail
                properties:
                  detail:
                    oneOf:
                      - type: string
                      - type: object
                        additionalProperties: true
                      - type: array
                        items: {}
        '502':
          description: Task creation failed. Submit a new request to retry.
          content:
            application/json:
              schema:
                type: object
                required:
                  - detail
                properties:
                  detail:
                    oneOf:
                      - type: string
                      - type: object
                        additionalProperties: true
                      - type: array
                        items: {}
        '503':
          description: Service temporarily unavailable; retry after the service recovers.
          content:
            application/json:
              schema:
                type: object
                required:
                  - detail
                properties:
                  detail:
                    oneOf:
                      - type: string
                      - type: object
                        additionalProperties: true
                      - type: array
                        items: {}
components:
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: Use VIDGO_API_KEY.

````