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

# Grok Imagine 画像から動画生成 Beta

> - Grok Imagine（grok-imagine-image-to-video-beta）モデルは画像から動画モードをサポート
- 非同期処理モード、返されたタスクIDを使用して[照会](/ja/api-manual/task-management/get-task-detail)
- 生成された動画リンクは24時間有効です。速やかに保存してください



## OpenAPI

````yaml ja/api-manual/video-series/grok/grok-imagine-image-to-video.json POST /v1/videos/generations
openapi: 3.1.0
info:
  title: grok-imagine-image-to-video インターフェース
  description: Grok Imagineモデルを使用した画像から動画への生成
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://api.evolink.ai
    description: 本番環境
security:
  - bearerAuth: []
paths:
  /v1/videos/generations:
    post:
      tags:
        - 動画生成
      summary: grok-imagine-image-to-video インターフェース
      description: >-
        - Grok Imagine（grok-imagine-image-to-video-beta）モデルは画像から動画モードをサポート

        -
        非同期処理モード、返されたタスクIDを使用して[照会](/ja/api-manual/task-management/get-task-detail)

        - 生成された動画リンクは24時間有効です。速やかに保存してください
      operationId: createGrokImagineImageToVideoGeneration
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GrokImagineImageToVideoRequest'
            examples:
              image_to_video:
                summary: 画像から動画
                value:
                  model: grok-imagine-image-to-video-beta
                  prompt: The person starts dancing
                  image_urls:
                    - https://example.com/image.jpg
                  duration: 6
                  mode: normal
      responses:
        '200':
          description: 動画タスクが正常に作成されました
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VideoGenerationResponse'
        '400':
          description: リクエストパラメータが不正です
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: invalid_request
                  message: Invalid request parameters
                  type: invalid_request_error
        '401':
          description: 未認証、トークンが無効または期限切れです
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: unauthorized
                  message: Invalid or expired token
                  type: authentication_error
        '402':
          description: クォータ不足のため、チャージが必要です
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: insufficient_quota
                  message: Insufficient quota. Please top up your account.
                  type: insufficient_quota
        '403':
          description: アクセスが拒否されました
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: model_access_denied
                  message: >-
                    Token does not have access to model:
                    grok-imagine-image-to-video-beta
                  type: invalid_request_error
        '429':
          description: レート制限を超えました
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: rate_limit_exceeded
                  message: Too many requests, please try again later
                  type: rate_limit_error
        '500':
          description: サーバー内部エラー
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: internal_error
                  message: Internal server error
                  type: api_error
components:
  schemas:
    GrokImagineImageToVideoRequest:
      type: object
      required:
        - model
        - prompt
        - image_urls
      properties:
        model:
          type: string
          description: >-
            モデル名


            **後方互換性：** 以前に統合されたモデル名 `grok-imagine-image-to-video`
            は引き続き使用可能で、`grok-imagine-image-to-video-beta` に自動的にマッピングされます
          enum:
            - grok-imagine-image-to-video-beta
          default: grok-imagine-image-to-video-beta
          example: grok-imagine-image-to-video-beta
        prompt:
          type: string
          description: 動画説明プロンプト
          example: The person starts dancing
        image_urls:
          type: array
          items:
            type: string
            format: uri
          description: |-
            参照画像URLリスト

            **要件:**
            - リクエストごとに`1`～`7`枚の画像をサポート
            - 画像サイズ: 最大`10MB`
            - サポートされる形式: JPEG, PNG, WebP
          minItems: 1
          maxItems: 7
          example:
            - https://example.com/image.jpg
        duration:
          type: integer
          description: 動画の長さ（秒）、`6`～`30`秒の範囲の任意の整数
          minimum: 6
          maximum: 30
          default: 6
          example: 6
        mode:
          type: string
          description: |-
            生成スタイル

            **オプション:**
            - `fun`: ファンスタイル
            - `normal`: ノーマルスタイル（デフォルト）
            - `spicy`: スパイシースタイル
          enum:
            - fun
            - normal
            - spicy
          default: normal
          example: normal
        aspect_ratio:
          type: string
          description: |-
            アスペクト比（複数画像モードでのみ有効。単一画像モードでは動画サイズは入力画像に従います）

            **オプション:**
            - `16:9`: 横長（デフォルト）
            - `9:16`: 縦長
            - `1:1`: 正方形
            - `3:2`: 横長 3:2
            - `2:3`: 縦長 2:3
          enum:
            - '16:9'
            - '9:16'
            - '1:1'
            - '3:2'
            - '2:3'
          default: '16:9'
          example: '16:9'
        callback_url:
          type: string
          description: >-
            タスク完了後のHTTPSコールバックURL


            **コールバックタイミング:**

            - タスクが完了、失敗、またはキャンセルされた時にトリガー

            - 課金確認後に送信


            **セキュリティ制限:**

            - HTTPSプロトコルのみサポート

            - 内部IPへのコールバックは禁止（127.0.0.1, 10.x.x.x, 172.16-31.x.x, 192.168.x.x
            など）

            - URLの長さは`2048`文字以下


            **コールバックメカニズム:**

            - タイムアウト: `10`秒

            - 失敗時最大`3`回リトライ（`1`/`2`/`4`秒後）

            - レスポンス形式はタスク照会APIと一致

            - 2xxステータスコード = 成功、その他はリトライをトリガー
          format: uri
          example: https://your-domain.com/webhooks/video-task-completed
    VideoGenerationResponse:
      type: object
      properties:
        created:
          type: integer
          description: タスク作成タイムスタンプ
          example: 1757169743
        id:
          type: string
          description: タスク ID
          example: task-unified-1757169743-7cvnl5zw
        model:
          type: string
          description: 使用された実際のモデル名
          example: grok-imagine-image-to-video-beta
        object:
          type: string
          enum:
            - video.generation.task
          description: 具体的なタスクタイプ
        progress:
          type: integer
          description: タスク進捗率（0-100）
          minimum: 0
          maximum: 100
          example: 0
        status:
          type: string
          description: タスクステータス
          enum:
            - pending
            - processing
            - completed
            - failed
          example: pending
        task_info:
          $ref: '#/components/schemas/VideoTaskInfo'
          description: 動画タスクの詳細情報
        type:
          type: string
          enum:
            - text
            - image
            - audio
            - video
          description: タスク出力タイプ
          example: video
        usage:
          $ref: '#/components/schemas/Usage'
          description: 使用量と課金情報
    ErrorResponse:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
              description: エラーコード識別子
            message:
              type: string
              description: エラーの説明
            type:
              type: string
              description: エラータイプ
    VideoTaskInfo:
      type: object
      properties:
        can_cancel:
          type: boolean
          description: タスクをキャンセルできるかどうか
          example: true
        estimated_time:
          type: integer
          description: 推定完了時間（秒）
          minimum: 0
          example: 120
    Usage:
      type: object
      description: 使用量と課金情報
      properties:
        billing_rule:
          type: string
          description: 課金ルール
          enum:
            - per_call
            - per_token
            - per_second
          example: per_call
        credits_reserved:
          type: number
          description: 推定消費クレジット
          minimum: 0
          example: 4.8
        user_group:
          type: string
          description: ユーザーグループカテゴリ
          enum:
            - default
            - vip
          example: default
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: |-
        ##すべてのAPIにBearer Token認証が必要です##

        **APIキーの取得：**

        [APIキー管理ページ](https://evolink.ai/dashboard/keys)にアクセスしてAPIキーを取得してください

        **リクエストヘッダーに追加：**
        ```
        Authorization: Bearer YOUR_API_KEY
        ```

````