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

# Grok Imagine Video 1.5

> Grok Imagine Video 1.5 API 可根据文本或一张首帧图片生成最高 1080p 的 1–15 秒视频，或根据最多七张参考图片生成最高 720p 的视频。

> [!TIP]
>
> 1. 提交后会返回 `task_id`。如果提供了 `callback_url`，当任务状态变为 `finished` 或 `failed` 时，系统会向 `callback_url` 发送 POST 请求。
> 2. 无论是否提供 `callback_url`，都可以通过统一的[查询任务状态](https://docs.poyo.ai/zh/api-manual/task-management/status.md)接口获取结果。

使用 `grok-imagine-video-1.5` 可通过三种生成模式输出 1–15 秒的视频：

* **文生视频**：不传两个图片字段。支持 480p、720p 和 1080p。
* **图生视频**：在 `image_urls` 中提供恰好一项作为首帧。支持 480p、720p 和 1080p。
* **参考生视频**：在 `reference_image_urls` 中提供 1–7 项。在提示词中以 `<IMAGE_0>`、`<IMAGE_1>` 等方式引用它们。支持 480p 和 720p。

`image_urls` 和 `reference_image_urls` 不能同时使用。

## 模型

* **grok-imagine-video-1.5** — Grok Imagine Video 1.5

## 必填参数

* **prompt**（必填）：最多 4,096 个字符。

## 可选参数

* **image\_urls**：图生视频所用的首帧图片，恰好一张。
* **reference\_image\_urls**：1–7 张参考图片，用于保持角色、主体或风格一致。
* **resolution**：`480p`、`720p` 或 `1080p`。参考生视频不支持 `1080p`。默认：`720p`。
* **duration**：`1` 到 `15` 的整数。默认：文本/图片模式为 `6`，参考模式为 `8`。
* **aspect\_ratio**：`16:9`、`4:3`、`3:2`、`1:1`、`2:3`、`3:4` 或 `9:16`。仅适用于文本模式和参考模式；默认：`16:9`。
* **callback\_url**：可选的完成通知 Webhook URL。

请使用公开的 HTTPS 图片 URL，或在提交前通过 Playground 上传图片。


## OpenAPI

````yaml zh/api-manual/video-series/grok-imagine-video-1-5.json POST /api/generate/submit
openapi: 3.0.0
info:
  title: PoYo AI - Grok Imagine Video 1.5 API
  description: >-
    Grok Imagine Video 1.5 API 可根据文本或一张首帧图像生成 1–15 秒、最高 1080p
    的视频，或根据最多七张参考图像生成最高 720p 的视频。
  version: 1.1.0
servers:
  - url: https://api.poyo.ai
    description: 生产环境
security:
  - BearerAuth: []
paths:
  /api/generate/submit:
    post:
      tags:
        - Grok Imagine Video 1.5
      summary: 提交 Grok Imagine Video 1.5 任务
      description: 根据提供的图像字段选择文本、图像或参考模式。
      operationId: submitGrokImagineVideo15Task
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SubmitRequest'
            examples:
              text-to-video:
                summary: 文生视频
                value:
                  model: grok-imagine-video-1.5
                  input:
                    prompt: A cinematic city at sunrise
                    resolution: 1080p
                    duration: 6
                    aspect_ratio: '16:9'
              image-to-video:
                summary: 图生视频
                value:
                  model: grok-imagine-video-1.5
                  input:
                    prompt: Slow camera push-in
                    image_urls:
                      - https://example.com/first-frame.png
                    resolution: 1080p
                    duration: 6
              reference-to-video:
                summary: 参考生视频
                value:
                  model: grok-imagine-video-1.5
                  input:
                    prompt: <IMAGE_0> meets <IMAGE_1> in a neon street
                    reference_image_urls:
                      - https://example.com/character.png
                      - https://example.com/style.png
                    resolution: 720p
                    duration: 8
                    aspect_ratio: '16:9'
      responses:
        '200':
          description: 任务提交成功
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SubmitResponse'
        '400':
          description: 请求参数无效
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: 未授权：API Key 无效
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    SubmitRequest:
      type: object
      required:
        - model
        - input
      properties:
        model:
          type: string
          enum:
            - grok-imagine-video-1.5
        callback_url:
          type: string
          format: uri
        input:
          $ref: '#/components/schemas/GenerationInput'
    SubmitResponse:
      type: object
      properties:
        code:
          type: integer
          example: 200
          enum:
            - 200
            - 400
            - 401
            - 402
            - 403
            - 404
            - 408
            - 429
            - 500
            - 502
            - 503
          description: >-
            业务状态码。`200` 表示成功，其他值都表示请求失败。请务必检查这个字段：部分参数校验错误会以 HTTP 200 返回，响应体里的
            `code` 为 `400`。


            - `200`：成功

            - `400`：请求参数无效

            - `401`：API Key 缺失或无效

            - `402`：积分不足

            - `403`：没有权限

            - `404`：资源不存在

            - `408`：请求超时

            - `429`：请求频率超限

            - `500`：服务器内部错误

            - `502`：上游服务错误

            - `503`：服务暂不可用


            详见[错误码](/zh/api-manual/error-codes)。
        message:
          type: string
        data:
          type: object
          properties:
            task_id:
              type: string
            status:
              type: string
              enum:
                - not_started
                - running
                - finished
                - failed
              description: >-
                任务状态。提交后立即返回时始终为
                `not_started`。后续状态请通过[查询任务状态](/zh/api-manual/task-management/status)接口或
                `callback_url` 获取。


                - `not_started`：排队中，等待处理

                - `running`：生成中

                - `finished`：已完成，结果在 `files` 或 `output` 中

                - `failed`：失败，详情见 `error_message`
            created_time:
              type: string
              format: date-time
    ErrorResponse:
      type: object
      required:
        - code
        - error
      properties:
        code:
          type: integer
          example: 400
          enum:
            - 200
            - 400
            - 401
            - 402
            - 403
            - 404
            - 408
            - 429
            - 500
            - 502
            - 503
          description: >-
            业务状态码。`200` 表示成功，其他值都表示请求失败。请务必检查这个字段：部分参数校验错误会以 HTTP 200 返回，响应体里的
            `code` 为 `400`。


            - `200`：成功

            - `400`：请求参数无效

            - `401`：API Key 缺失或无效

            - `402`：积分不足

            - `403`：没有权限

            - `404`：资源不存在

            - `408`：请求超时

            - `429`：请求频率超限

            - `500`：服务器内部错误

            - `502`：上游服务错误

            - `503`：服务暂不可用


            详见[错误码](/zh/api-manual/error-codes)。
        error:
          type: object
          required:
            - message
            - type
          properties:
            message:
              type: string
              example: Invalid request parameters
            type:
              type: string
              example: invalid_request_error
    GenerationInput:
      type: object
      required:
        - prompt
      description: >-
        文生视频时省略图像字段。使用 image_urls 提供一张首帧，或使用 reference_image_urls 提供 1–7
        张参考图像。两个图像字段互斥。
      properties:
        prompt:
          type: string
          maxLength: 4096
          description: 提示词。参考模式下使用 <IMAGE_0>、<IMAGE_1> 等。
        image_urls:
          type: array
          minItems: 1
          maxItems: 1
          items:
            type: string
            format: uri
          description: 图生视频使用的单张首帧图像。
        reference_image_urls:
          type: array
          minItems: 1
          maxItems: 7
          items:
            type: string
            format: uri
          description: 参考生视频的参考图像。
        resolution:
          type: string
          enum:
            - 480p
            - 720p
            - 1080p
          default: 720p
          description: 参考生视频仅支持 480p 和 720p。
        duration:
          type: integer
          minimum: 1
          maximum: 15
          description: 默认为 6，参考模式下默认为 8。
        aspect_ratio:
          type: string
          enum:
            - '16:9'
            - '4:3'
            - '3:2'
            - '1:1'
            - '2:3'
            - '3:4'
            - '9:16'
          default: '16:9'
          description: 仅用于文本模式和参考模式。
      allOf:
        - not:
            required:
              - image_urls
              - reference_image_urls
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key
      description: >-
        所有 API 接口都需要 Bearer Token 认证。


        创建 API Key：登录 PoYo，进入 **仪表盘 → API
        密钥**（[poyo.ai/zh/dashboard/api-key](https://poyo.ai/zh/dashboard/api-key)），点击创建
        Key。


        在请求头中添加：


        ```

        Authorization: Bearer YOUR_API_KEY

        ```

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.