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

# HappyHorse 1.1 Reference-to-Video 参照画像から動画

> - HappyHorse 1.1 参照画像から動画。1〜9枚の参照画像とテキストプロンプトに対応
- **キャラクター参照規約**：`prompt` 内で `character1`、`character2`、`character3` ... のキーワードを使用し、`image_urls` 配列内の画像を順に参照
- 非同期処理モード。返却されたタスクIDで[照会してください](/ja/api-manual/task-management/get-task-detail)
- 生成された動画リンクの有効期限は24時間です。お早めに保存してください



## OpenAPI

````yaml ja/api-manual/video-series/happyhorse1.1/happyhorse-1.1-reference-to-video.json POST /v1/videos/generations
openapi: 3.1.0
info:
  title: HappyHorse 1.1 Reference-to-Video API
  description: HappyHorse 1.1 参照画像から動画生成API。1〜9枚の参照画像とテキストプロンプトから動画を生成
  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: HappyHorse 1.1 Reference-to-Video 参照画像から動画
      description: >-
        - HappyHorse 1.1 参照画像から動画。1〜9枚の参照画像とテキストプロンプトに対応

        - **キャラクター参照規約**：`prompt` 内で `character1`、`character2`、`character3` ...
        のキーワードを使用し、`image_urls` 配列内の画像を順に参照

        -
        非同期処理モード。返却されたタスクIDで[照会してください](/ja/api-manual/task-management/get-task-detail)

        - 生成された動画リンクの有効期限は24時間です。お早めに保存してください
      operationId: createHappyHorse11ReferenceToVideo
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/VideoGenerationRequest'
            examples:
              multi_character:
                summary: 複数キャラクター参照画像から動画
                value:
                  model: happyhorse-1.1-reference-to-video
                  prompt: >-
                    A woman in a red qipao character1, the camera first frames
                    the slim cut of the qipao from a side medium shot, then
                    switches to a low-angle upward shot capturing details as she
                    gracefully lifts her hand to open a folding fan character2,
                    with tasseled earrings character3 swaying lightly as she
                    turns her head.
                  image_urls:
                    - https://cdn.example.com/girl.jpg
                    - https://cdn.example.com/folding-fan.jpg
                    - https://cdn.example.com/earrings.jpg
                  quality: 720p
                  aspect_ratio: '16:9'
                  duration: 5
              single_reference:
                summary: 単一画像参照から動画
                value:
                  model: happyhorse-1.1-reference-to-video
                  prompt: >-
                    character1 runs through a forest, with sunlight filtering
                    through the leaves
                  image_urls:
                    - https://cdn.example.com/character.jpg
                  quality: 1080p
                  aspect_ratio: '9:16'
                  duration: 6
      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: 未認証、Tokenが無効または期限切れ
          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:
                    happyhorse-1.1-reference-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
        - image_urls
      properties:
        model:
          type: string
          description: 動画生成モデル名
          enum:
            - happyhorse-1.1-reference-to-video
          default: happyhorse-1.1-reference-to-video
          example: happyhorse-1.1-reference-to-video
        prompt:
          type: string
          description: >-
            テキストプロンプト、**必須**


            **長さ制限：**

            - 中国語：最大 `2500` 文字

            - 中国語以外：最大 `5000` 文字

            - 超過部分は自動的に切り詰められます


            **キャラクター参照規約（重要）：**

            - プロンプトでは `character1`、`character2`、`character3` ...
            のキーワードを明示的に使用し、`image_urls` 内の画像を順に参照する必要があります

            - 1枚目は `character1`、2枚目は `character2` に対応、以下同様

            - 明示的な参照がないと、キャラクターの混同が発生する可能性があります
          example: >-
            A woman in a red qipao character1, the camera first frames the slim
            cut of the qipao from a side medium shot, then switches to a
            low-angle upward shot capturing details as she gracefully lifts her
            hand to open a folding fan character2, with tasseled earrings
            character3 swaying lightly as she turns her head.
        image_urls:
          type: array
          description: >-
            参照画像URL配列、**必須**、**1 ~ 9 枚**


            **画像要件：**

            - 対応フォーマット：JPEG、JPG、PNG、WEBP

            - 解像度：短辺 ≥ `400` px、720P以上の鮮明な画像を推奨（極端に小さい・ぼやけた・強圧縮された画像は避ける）

            - 推奨アスペクト比：短辺 / 長辺 ≥ `0.4`、複数画像のアスペクト比を一致させる（ターゲット動画の比率に近づける）

            - ファイルサイズ：1枚あたり ≤ `10MB`

            - 画像URLは **公開アクセス可能（HTTP または HTTPS）**
            である必要があります。プライベートOSS、イントラネット、認証必須リンクは非対応


            **順序：** 配列の順序がプロンプト内の `character1`、`character2` ... 参照に対応
          items:
            type: string
            format: uri
          minItems: 1
          maxItems: 9
          example:
            - https://cdn.example.com/girl.jpg
            - https://cdn.example.com/folding-fan.jpg
            - https://cdn.example.com/earrings.jpg
        quality:
          type: string
          description: |-
            動画解像度ランク、デフォルトは `720p`

            **選択可能な値：**
            - `720p`：標準解像度、デフォルト値
            - `1080p`：HD解像度

            **課金注意：** 解像度ランクは課金に直接影響します
          enum:
            - 720p
            - 1080p
          default: 720p
          example: 720p
        aspect_ratio:
          type: string
          description: |-
            動画のアスペクト比、デフォルトは `16:9`

            **選択可能な値：**
            - `16:9`（横向き）
            - `9:16`（縦向き）
            - `1:1`（正方形）
            - `4:3`
            - `3:4`
            - `4:5`
            - `5:4`
            - `9:21`
            - `21:9`
          enum:
            - '16:9'
            - '9:16'
            - '1:1'
            - '4:3'
            - '3:4'
            - '4:5'
            - '5:4'
            - '9:21'
            - '21:9'
          default: '16:9'
          example: '16:9'
        duration:
          type: integer
          description: |-
            動画の再生時間（秒）、デフォルトは `5` 秒

            **範囲：**
            - 整数 `3` ~ `15`
            - 再生時間は課金に直接影響します
          default: 5
          minimum: 3
          maximum: 15
          example: 5
        seed:
          type: integer
          description: |-
            ランダムシード、デフォルトはランダム

            **説明：**
            - 範囲：`1` ~ `2147483647`
            - 固定シードはプロンプト調整時のパラメータ変動を抑え、再現性を向上させます
          minimum: 1
          maximum: 2147483647
          example: 42
        callback_url:
          type: string
          description: >-
            タスク完了後の HTTPS コールバックアドレス


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

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

            - 課金確認完了後に送信


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

            - 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: 1761313744
        id:
          type: string
          description: タスクID
          example: task-unified-1761313744-h1r2vef0
        model:
          type: string
          description: 実際に使用されたモデル名
          example: happyhorse-1.1-reference-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
            - cancelled
          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: 2400
        video_duration:
          type: integer
          description: 動画の再生時間（秒）
          example: 5
    VideoUsage:
      type: object
      description: 使用量と課金情報
      properties:
        billing_rule:
          type: string
          description: 課金ルール
          enum:
            - per_call
            - per_token
            - per_second
          example: per_second
        credits_reserved:
          type: number
          description: 推定消費クレジット数
          minimum: 0
          example: 607500
        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
        ```

````