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

# 创建 Grok 1.5 视频

> 创建 Grok 1.5 视频生成任务。任务创建后，请使用通用视频任务查询接口获取生成状态和结果。

<Note>
  创建成功后会返回 `task_id`。请使用 [查询视频任务](/zh/api-reference/common/query) 接口轮询任务状态，任务完成后从 `result.video_url` 获取视频地址。
</Note>

## 支持的模型

| model                    | 说明                                             |
| ------------------------ | ---------------------------------------------- |
| `grok-imagine-video-1.5` | Grok 1.5 视频模型，支持 10、15 秒与自定义比例，必须且仅支持提供 1 张参考图 |

`grok-1.5`、`grok_1_5` 等别名会归一化为 `grok-imagine-video-1.5`。

## 参数限制

* **参考图片**：`grok-imagine-video-1.5` 必须搭配参考图片使用。请在 `image_urls`（或 `images`）字段中上传恰好 1 张参考图。
* **时长**：仅支持 10 或 15 秒（默认值为 10）。
* **比例**：支持 `16:9`、`9:16`、`1:1`、`3:2`、`2:3`（默认值为 `16:9`）。

## 示例请求

```bash theme={null}
curl -X POST 'https://www.jimmyai.cn/api/open-api/v1/grok/videos' \
  -H 'Authorization: Bearer sk_xxx' \
  -H 'Content-Type: application/json' \
  -d '{
    "model": "grok-imagine-video-1.5",
    "prompt": "一只精美的茶杯中缓缓注入热茶，雾气袅袅，微距镜头摄影",
    "ratio": "16:9",
    "duration": 10,
    "image_urls": ["https://example.com/cup.jpg"]
  }'
```


## OpenAPI

````yaml POST /api/open-api/v1/grok/videos
openapi: 3.1.0
info:
  title: Jimmy AI OpenAPI
  description: API for Jimmy AI video generation services
  version: 1.0.0
servers:
  - url: https://www.jimmyai.cn
    description: Production server
security:
  - bearerAuth: []
paths:
  /api/open-api/v1/grok/videos:
    post:
      summary: Create Grok 1.5 Video
      description: >-
        Create a Grok 1.5 video generation task. Once created, use the common
        query task endpoint to get task details.
      operationId: createGrokVideo
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GrokGenerationRequest'
      responses:
        '200':
          description: Task created successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VideoGenerationResponse'
components:
  schemas:
    GrokGenerationRequest:
      type: object
      required:
        - model
        - prompt
        - image_urls
      properties:
        model:
          type: string
          enum:
            - grok-imagine-video-1.5
          description: >-
            Model name. grok-imagine-video-1.5, grok-1.5, and grok_1_5 normalize
            to grok-imagine-video-1.5.
        prompt:
          type: string
          description: Text prompt for video generation
        duration:
          type: integer
          default: 10
          enum:
            - 10
            - 15
          description: >-
            Video duration in seconds. Only supports 10 or 15 seconds. Defaults
            to 10.
        ratio:
          type: string
          default: '16:9'
          enum:
            - '16:9'
            - '9:16'
            - '1:1'
            - '3:2'
            - '2:3'
          description: >-
            Video aspect ratio (e.g., 16:9, 9:16). Takes precedence over
            orientation.
        orientation:
          type: string
          enum:
            - landscape
            - portrait
          description: >-
            Video orientation. Active only when ratio is empty: landscape maps
            to 16:9, portrait maps to 9:16.
        image_urls:
          type: array
          items:
            type: string
          description: >-
            Reference image URL list. grok-imagine-video-1.5 requires exactly 1
            reference image.
        images:
          type: array
          items:
            type: string
          description: >-
            Compatibility field for common OpenAPI image inputs; used when
            image_urls is empty. Requires exactly 1 image.
      example:
        model: grok-imagine-video-1.5
        prompt: >-
          A beautiful butterfly flying among flowers, slow motion,
          hyper-detailed
        duration: 10
        ratio: '16:9'
        image_urls:
          - https://example.com/butterfly.jpg
    VideoGenerationResponse:
      type: object
      properties:
        code:
          type: string
          example: '20000'
        msg:
          type: string
          example: ok
        data:
          type: object
          properties:
            task_id:
              type: string
            status:
              type: string
            model:
              type: string
            created_at:
              type: integer
              format: int64
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````