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

# タスクを照会する（Seedance）

> このシリーズはOpenAIの動画生成形式をサポートしています（詳細はリンク [動画生成Sora互換形式](/api-reference/ja/video-generation-sora-compatible-format/create-video) を参照してください）。

動画生成タスクを作成し、タスクIDを使用してステータスと結果を照会するために使用します。

タスク作成の主要フィールド：
- `model`：必須、モデル名。
- `prompt`：必須、動画生成のメイン説明文。
- `content`：任意。Volcano Ark の content 配列で、テキスト、画像、動画、音声素材を混在して配置できます。
- `function_mode`：任意、通常、万能リファレンスなどのアドバンスドモードで使用されます。

互換性のある入力パラメータ：

以下のフィールドは主に既存クライアントおよび旧プロトコルとの互換性のために使用します。新規接続では、できるだけこのページの「リクエスト例」にある標準形式を使用してください。テキストと参考素材は `content` 配列を使用し、生成設定は最上位の `duration`、`ratio`、`resolution`、`fps` などのフィールドを使用します。

- `mode`：`t2v / i2v / i2v_first_last / reference_images / reference_material`
- `image_url / image_urls / input_reference`
- `end_image_url / last_image_url`
- `video_urls / audio_urls`
- `seconds / duration`
- `aspect_ratio / ratio / size`
- `quality / resolution`
- `fps`
- `generate_audio / watermark`

呼び出しの詳細：
- `mode=reference_material` または `function_mode=omni_reference` の場合、`content` を介してテキストとリファレンス素材を渡すことを推奨します。
- `content` テキスト項目の記述形式は `{ "type": "text", "text": "测试文字" }` です。
- `content` 画像、動画、音声素材項目はそれぞれ `image_url`、`video_url`、`audio_url` のオブジェクト形式を使用します。例: `{ "type": "image_url", "image_url": { "url": "https://example.com/ref.png" }, "role": "reference_image", "name": "1" }`。
- `role` で素材の用途を識別でき、`name` はプロンプト内で名前指定による参照に使用できます。
- `ratio`、`duration`、`resolution`、`fps` は、最終的な生成設定に影響します。

Gemini Omni の呼び出し：
- `gemini-omni` は、本 Seedance タスク API からも呼び出せます。
- `mode=t2v` はテキストから動画の生成に使用し、`mode=r2v` は参照画像/参照素材を用いた生成に使用し、`mode=edit` は動画編集に使用します。
- テキストは `prompt` または `content` の `text` 項目に配置できます。画像は `image_url / image_urls / reference_images / input_reference / content` に、動画は `video_urls / content` に配置できます。
- 再生時間フィールドは `duration` または `seconds` を使用でき、4 / 6 / 8 / 10 秒のいずれかに自動でマッチします。

MiniMax / Hailuo の呼び出し：
- `minimax-h3` は本タスク API で呼び出せます。テキストから動画生成、画像参照、音声参照に対応しています。テキストは `prompt` または `content` のテキスト項目に、素材は `content`、`image_urls`、`audio_urls` などのフィールドに指定できます。
- `hailuo-2.3` は本タスク API で呼び出せます。最初のフレーム画像が必要です。`content` には `role=first_frame` の `image_url` 項目を渡すことを推奨します。
- `minimax-h3` でよく使うのは `duration=5~15`、`resolution=1440p` です。`hailuo-2.3` でよく使うのは `duration=6` または `10`、`resolution=768p` です。

照会結果の注目フィールド：
- `items[].status`
- `items[].content.video_url` または `items[].video_url`
- `items[].error`
- `items[].progress`

Error fields: `error.code`, `error.message`.

```json
{
  "error": {
    "code": "invalid_request_error",
    "message": "requires at least one image in `images`"
  }
}
```



## OpenAPI

````yaml api-reference/ja/openapi.json GET /api/v3/contents/generations/tasks/{task_id}
openapi: 3.0.0
info:
  title: 出海营 API 参考ドキュメント
  version: 1.0.0
  description: Public AI Gateway API Reference
servers:
  - url: https://api.aiid.edu.kg
security:
  - BearerAuth: []
tags:
  - name: OpenAI形式(Chat)
  - name: OpenAI形式（Responses）
  - name: 画像生成Gemini形式
  - name: 画像生成OpenAI DALL-E形式
  - name: モデル一覧の取得
  - name: 動画生成HappyHorseとWan
  - name: 動画生成Kling形式
  - name: 動画生成OmniとVeo形式
  - name: Video generation Seedance
  - name: 動画生成Sora対応形式
  - name: Video generation Vidu
  - name: 音楽生成タスクの形式
paths:
  /api/v3/contents/generations/tasks/{task_id}:
    get:
      tags:
        - Video generation Seedance
      summary: タスクを照会する（Seedance）
      description: >-
        このシリーズはOpenAIの動画生成形式をサポートしています（詳細はリンク
        [動画生成Sora互換形式](/api-reference/ja/video-generation-sora-compatible-format/create-video)
        を参照してください）。


        動画生成タスクを作成し、タスクIDを使用してステータスと結果を照会するために使用します。


        タスク作成の主要フィールド：

        - `model`：必須、モデル名。

        - `prompt`：必須、動画生成のメイン説明文。

        - `content`：任意。Volcano Ark の content 配列で、テキスト、画像、動画、音声素材を混在して配置できます。

        - `function_mode`：任意、通常、万能リファレンスなどのアドバンスドモードで使用されます。


        互換性のある入力パラメータ：


        以下のフィールドは主に既存クライアントおよび旧プロトコルとの互換性のために使用します。新規接続では、できるだけこのページの「リクエスト例」にある標準形式を使用してください。テキストと参考素材は
        `content` 配列を使用し、生成設定は最上位の `duration`、`ratio`、`resolution`、`fps`
        などのフィールドを使用します。


        - `mode`：`t2v / i2v / i2v_first_last / reference_images /
        reference_material`

        - `image_url / image_urls / input_reference`

        - `end_image_url / last_image_url`

        - `video_urls / audio_urls`

        - `seconds / duration`

        - `aspect_ratio / ratio / size`

        - `quality / resolution`

        - `fps`

        - `generate_audio / watermark`


        呼び出しの詳細：

        - `mode=reference_material` または `function_mode=omni_reference`
        の場合、`content` を介してテキストとリファレンス素材を渡すことを推奨します。

        - `content` テキスト項目の記述形式は `{ "type": "text", "text": "测试文字" }` です。

        - `content` 画像、動画、音声素材項目はそれぞれ `image_url`、`video_url`、`audio_url`
        のオブジェクト形式を使用します。例: `{ "type": "image_url", "image_url": { "url":
        "https://example.com/ref.png" }, "role": "reference_image", "name": "1"
        }`。

        - `role` で素材の用途を識別でき、`name` はプロンプト内で名前指定による参照に使用できます。

        - `ratio`、`duration`、`resolution`、`fps` は、最終的な生成設定に影響します。


        Gemini Omni の呼び出し：

        - `gemini-omni` は、本 Seedance タスク API からも呼び出せます。

        - `mode=t2v` はテキストから動画の生成に使用し、`mode=r2v`
        は参照画像/参照素材を用いた生成に使用し、`mode=edit` は動画編集に使用します。

        - テキストは `prompt` または `content` の `text` 項目に配置できます。画像は `image_url /
        image_urls / reference_images / input_reference / content` に、動画は
        `video_urls / content` に配置できます。

        - 再生時間フィールドは `duration` または `seconds` を使用でき、4 / 6 / 8 / 10
        秒のいずれかに自動でマッチします。


        MiniMax / Hailuo の呼び出し：

        - `minimax-h3` は本タスク API で呼び出せます。テキストから動画生成、画像参照、音声参照に対応しています。テキストは
        `prompt` または `content` のテキスト項目に、素材は `content`、`image_urls`、`audio_urls`
        などのフィールドに指定できます。

        - `hailuo-2.3` は本タスク API で呼び出せます。最初のフレーム画像が必要です。`content` には
        `role=first_frame` の `image_url` 項目を渡すことを推奨します。

        - `minimax-h3` でよく使うのは `duration=5~15`、`resolution=1440p`
        です。`hailuo-2.3` でよく使うのは `duration=6` または `10`、`resolution=768p` です。


        照会結果の注目フィールド：

        - `items[].status`

        - `items[].content.video_url` または `items[].video_url`

        - `items[].error`

        - `items[].progress`


        Error fields: `error.code`, `error.message`.


        ```json

        {
          "error": {
            "code": "invalid_request_error",
            "message": "requires at least one image in `images`"
          }
        }

        ```
      operationId: query__seedance__task
      parameters:
        - name: task_id
          in: path
          required: true
          schema:
            type: string
          description: Task ID
      responses:
        '200':
          description: 照会に成功しました
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                    description: タスク ID。
                  model:
                    type: string
                  status:
                    type: string
                    description: タスクのステータス。
                    enum:
                      - queued
                      - running
                      - succeeded
                      - failed
                  error:
                    type: object
                    nullable: true
                    properties:
                      code:
                        type: string
                      message:
                        type: string
                  created_at:
                    type: integer
                    description: 作成日時（Unix秒）。
                  updated_at:
                    type: integer
                  content:
                    type: object
                    properties:
                      video_url:
                        type: string
                      last_frame_url:
                        type: string
                  usage:
                    type: object
                    properties:
                      completion_tokens:
                        type: integer
                      total_tokens:
                        type: integer
                  items:
                    type: string
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                          description: タスク ID。
                        status:
                          type: string
                          description: >-
                            タスクのステータス。一般的には
                            `queued`、`running`、`succeeded`、`failed` があります。
                        content:
                          type: object
                          properties:
                            video_url:
                              type: string
                              description: 動画結果のURL。
                        video_url:
                          type: string
                          description: 動画結果のURL。
                        error:
                          type: string
                          description: 失敗時のエラーメッセージ。
                        progress:
                          type: string
                          description: タスクの進捗。
      security:
        - BearerAuth: []
components:
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: |-
        Bearer Token を使用して認証します。
        形式: `Authorization: Bearer sk-xxxxxx`

````