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

# Get Grok video content

> Download the MP4 file of a completed Grok video task through the API proxy

## When to use

Use this endpoint when you want to proxy the download through your own
server, or when accessing the `metadata.url` link directly is inconvenient.

## Preconditions

* The task `status` must be `completed`
* The task has not expired (see the `expires_at` field)

## Response format

On success it returns a `video/mp4` byte stream with HTTP 200.
The client should write the response body to a file or stream it to
the end user.

## Alternative

If you only need the link, just read `metadata.url` from the
`GET /v1/videos/{task_id}` response — no need to download via this endpoint.


## OpenAPI

````yaml /openapi/grok-video.en.yaml get /v1/videos/{task_id}/content
openapi: 3.1.0
info:
  title: InfinityBlue API — Grok Imagine Video
  version: 1.0.0
  summary: Grok Imagine video generation API (/v1/videos async)
  description: >
    Grok Imagine video generation API, using the `/v1/videos`

    **asynchronous task model**: submit task → poll status → fetch result.


    ## Usage notes


    - **Resolution is selected by the model name**: use a `-480p` / `-720p`
      suffixed model to choose the resolution; **do not pass a `resolution`
      parameter**. For 720p, use `grok-imagine-video-720p`.
    - **`size` only sets the aspect ratio** (e.g. `1280x720` → 16:9); it does
      NOT set the resolution. Do not use `1792x1024` / `1024x1792`.
    - Parameters such as `generate_audio`, `camera_fixed`, and `watermark` are
      not supported. `grok-imagine-video-1.5-preview` is **image-to-video
      only** (an input image is required) and includes synchronized audio.

    ## Typical flow


    1. `POST /v1/videos` — submit a task and receive a task object (with `id`)

    2. `GET /v1/videos/{task_id}` — poll until `status` is `completed` or
    `failed`

    3. Read the video URL from `metadata.url`, or stream the file via
       `GET /v1/videos/{task_id}/content`

    ## Authentication


    Every request must include the API Key in the header:

    ```

    Authorization: Bearer YOUR_API_KEY

    ```
  contact:
    name: InfinityBlue
    url: https://getinfinityblue.com
servers:
  - url: https://api.getinfinityblue.com
    description: Production
security:
  - bearerAuth: []
tags:
  - name: Grok Imagine Video
    description: >
      Grok Imagine video generation API, reusing the `/v1/videos` async task

      model. Resolution is selected by the model-name suffix (`-480p` /
      `-720p`);

      `size` only controls the aspect ratio.
paths:
  /v1/videos/{task_id}/content:
    get:
      tags:
        - Grok Imagine Video
      summary: Get Grok video content
      description: |
        Get the video file content of a completed Grok video task.
        The endpoint proxies/redirects to the video stream and returns the raw
        `video/mp4` byte stream. Available only when `status=completed`;
        otherwise it returns 404.
      operationId: getGrokVideoContent
      parameters:
        - name: task_id
          in: path
          description: The video task ID returned by the create endpoint's `id` field.
          required: true
          schema:
            type: string
          example: video_abc123
      responses:
        '200':
          description: >-
            Video content retrieved successfully, returns the raw MP4 byte
            stream
          content:
            video/mp4:
              schema:
                type: string
                format: binary
                description: The raw byte stream of the video file.
        '400':
          description: Invalid request parameters
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Invalid or missing API Key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Task not found, not yet complete, or content expired
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '429':
          description: Rate limit exceeded
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    ErrorResponse:
      type: object
      description: Standard error response.
      properties:
        error:
          type: object
          properties:
            message:
              type: string
              description: Error message.
              examples:
                - Invalid duration. The supported range is 1 to 15 seconds.
            type:
              type: string
              description: Error type.
              examples:
                - invalid_request_error
            param:
              type:
                - string
                - 'null'
              description: The related parameter.
              examples:
                - seconds
            code:
              type:
                - string
                - 'null'
              description: Error code.
              examples:
                - invalid_duration
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key
      description: >
        Bearer Token authentication, format: `Authorization: Bearer sk-xxxxxx`.

        Get an API Key in the
        [console](https://api.getinfinityblue.com/console).

````