> ## 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.

# Kling-O3 画像から動画へ

> - Kling-O3 Image to Video（kling-o3-image-to-video）はKling AI kling-v3-omniモデルを搭載し、入力画像に基づいて動画を生成
- 最初のフレーム、最後のフレーム、参照画像、要素制御、マルチショット、効果音をサポート
- 非同期処理モード、返されたタスクIDを使用して[ステータスを照会](/ja/api-manual/task-management/get-task-detail)
- 生成された動画リンクは24時間有効です。速やかに保存してください



## OpenAPI

````yaml ja/api-manual/video-series/kling/kling-o3-image-to-video.json POST /v1/videos/generations
openapi: 3.1.0
info:
  title: kling-o3-image-to-video API
  description: >-
    入力画像に基づいて動画を生成。最初のフレーム、最後のフレーム、参照画像、要素制御、マルチショット、効果音をサポート。Kling AI
    kling-v3-omniモデルに基づいています。
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://api.evolink.ai
    description: 本番環境
security:
  - bearerAuth: []
tags:
  - name: 動画生成
    description: AI動画生成API
paths:
  /v1/videos/generations:
    post:
      tags:
        - 動画生成
      summary: kling-o3-image-to-video API
      description: >-
        - Kling-O3 Image to Video（kling-o3-image-to-video）はKling AI
        kling-v3-omniモデルを搭載し、入力画像に基づいて動画を生成

        - 最初のフレーム、最後のフレーム、参照画像、要素制御、マルチショット、効果音をサポート

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

        - 生成された動画リンクは24時間有効です。速やかに保存してください
      operationId: createVideoGeneration
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/VideoGenerationRequest'
            examples:
              first_frame:
                summary: 単一画像の最初のフレーム（最小構成）
                value:
                  model: kling-o3-image-to-video
                  prompt: The person in the image slowly turns their head and smiles
                  image_start: https://example.com/portrait.jpg
                  duration: 5
                  quality: 720p
              first_last_frame:
                summary: 最初のフレーム + 最後のフレーム
                value:
                  model: kling-o3-image-to-video
                  prompt: Transition from daytime to nighttime
                  image_start: https://example.com/day.jpg
                  image_end: https://example.com/night.jpg
                  duration: 10
                  quality: 1080p
                  sound: 'on'
              with_reference_and_element:
                summary: 参照画像 + エレメント制御
                value:
                  model: kling-o3-image-to-video
                  prompt: <<<element_1>>> dancing in the scene of <<<image_1>>>
                  image_urls:
                    - https://example.com/scene.jpg
                  duration: 8
                  aspect_ratio: '16:9'
                  quality: 1080p
                  model_params:
                    element_list:
                      - element_id: '123456'
              multi_shot:
                summary: マルチショット画像から動画生成
                value:
                  model: kling-o3-image-to-video
                  image_start: https://example.com/portrait.jpg
                  image_urls:
                    - https://example.com/bg.jpg
                  duration: 10
                  aspect_ratio: '16:9'
                  quality: 1080p
                  model_params:
                    multi_shot: true
                    shot_type: customize
                    multi_prompt:
                      - index: 1
                        prompt: <<<image_1>>> person sitting in a park
                        duration: '5'
                      - index: 2
                        prompt: Camera switches to <<<image_2>>> street view
                        duration: '5'
      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: kling-o3-image-to-video'
                  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:
    VideoGenerationRequest:
      type: object
      required:
        - model
        - prompt
      properties:
        model:
          type: string
          description: 動画生成モデル名
          enum:
            - kling-o3-image-to-video
          default: kling-o3-image-to-video
          example: kling-o3-image-to-video
        prompt:
          type: string
          description: >-
            テキストプロンプト。multi_shot=false（デフォルト）の場合は必須、multi_shot=trueの場合は各ショットのプロンプトをmulti_promptで指定します


            **注意:**

            - 最大`2500`文字

            - `<<<element_1>>>`でエレメントを参照、`<<<image_1>>>`で画像を参照できます
          maxLength: 2500
        image_start:
          type: string
          format: uri
          description: |-
            最初のフレーム画像URL

            **画像フォーマット要件:**
            - フォーマット: JPG / JPEG / PNG
            - サイズ: <= 10MB
            - 寸法: 幅と高さ >= 300px、アスペクト比は1:2.5から2.5:1の間
            - 画像URLはサーバーから直接アクセスできる必要があります。アクセス時に直接ダウンロードされるURLでも構いません
        image_end:
          type: string
          format: uri
          description: |-
            最後のフレーム画像URL

            **制約:**
            - 最後のフレームには最初のフレームが必要です
            - 画像の合計数が2を超える場合、最後のフレームはサポートされません
            - 画像URLはサーバーから直接アクセスできる必要があります。アクセス時に直接ダウンロードされるURLでも構いません
        image_urls:
          type: array
          description: |-
            参照画像URLの配列（最初/最後のフレームではなく、スタイル/シーン/エレメントの参照用）

            **注意：**
            - 画像URLはサーバーから直接アクセスできる必要があります。アクセス時に直接ダウンロードされるURLでも構いません
          items:
            type: string
            format: uri
        duration:
          type: integer
          description: 動画の長さ（秒）、3〜15の整数
          minimum: 3
          maximum: 15
          default: 5
        aspect_ratio:
          type: string
          description: 動画のアスペクト比
          enum:
            - '16:9'
            - '9:16'
            - '1:1'
        quality:
          type: string
          description: |-
            解像度レベル

            **オプション:**
            - `720p`: 標準 720P
            - `1080p`: 高画質 1080P
            - `4k`: 超高画質 4K
          enum:
            - 720p
            - 1080p
            - 4k
        sound:
          type: string
          description: 効果音制御
          enum:
            - 'on'
            - 'off'
          default: 'off'
        model_params:
          type: object
          description: モデル拡張パラメータ
          properties:
            multi_shot:
              type: boolean
              description: >-
                マルチショットを有効にするかどうか


                **注意:**
                有効にすると、`prompt`パラメータは無視され、各ショットの内容は`multi_prompt`で定義する必要があります。すべてのショットの`duration`の合計は、動画の総再生時間と一致する必要があります。
            shot_type:
              type: string
              description: ショット分割方法。multi_shot=trueの場合は必須
              enum:
                - customize
            multi_prompt:
              type: array
              description: >-
                ショット情報リスト。multi_shot=true && shot_type=customizeの場合は必須


                フォーマット: [{"index": int, "prompt": "string", "duration":
                "string"}, ...]

                - 最大6ショット

                - 各ショットのプロンプトは最大512文字

                - 全ショットの合計時間は総時間と一致する必要があります
            element_list:
              type: array
              description: |-
                エレメントライブラリリスト

                **制約:**
                - 最初のフレームが指定されている場合、エレメント数 <= 3
                - 動画がない場合、画像数 + エレメント数 <= 7
                - プロンプト内で`<<<element_1>>>`構文を使用して参照
              items:
                type: object
                properties:
                  element_id:
                    type: string
                    description: エレメントID
            watermark_info:
              type: object
              description: ウォーターマーク設定
              properties:
                enabled:
                  type: boolean
                  description: ウォーターマークを有効にするかどうか
        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: kling-o3-image-to-video
        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/VideoUsage'
          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: 300
        video_duration:
          type: integer
          description: 動画の長さ（秒）
          example: 9
    VideoUsage:
      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: 7
        user_group:
          type: string
          description: ユーザーグループカテゴリ
          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
        ```

````