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

# Query task (Seedance)

> This series supports OpenAI video generation formats (see the link [Video generation Sora compatible formats](/api-reference/en/video-generation-sora-compatible-format/create-video)).

Used to create video generation tasks and query status and results via task ID.

Core fields for task creation:
- `model`: Required. Model name.
- `prompt`: Required. Primary description for video generation.
- `content`: Optional, the Volcano Ark content array, mixing text, image, video, and audio materials.
- `function_mode`: Optional. Commonly used for advanced modes such as Omni-Reference.

Compatible input parameters:

The following fields are mainly used for compatibility with legacy clients and older protocols. For new integrations, please use the standard format in the “Request Example” on this page whenever possible: use the `content` array for text and reference materials, and use top-level `duration`, `ratio`, `resolution`, `fps`, and other fields for generation configuration.

- `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`

Call details:
- When using `mode=reference_material` or `function_mode=omni_reference`, it is recommended to pass text and reference materials via `content`.
- `content` text items are written as `{ "type": "text", "text": "测试文字" }`.
- `content` image, video, and audio material items use the `image_url`, `video_url`, and `audio_url` object formats respectively, for example `{ "type": "image_url", "image_url": { "url": "https://example.com/ref.png" }, "role": "reference_image", "name": "1" }`.
- `role` can be used to identify the purpose of the material, and `name` can be referenced by name in prompts.
- `ratio`, `duration`, `resolution`, and `fps` will affect the final generation configuration.

Gemini Omni invocation:
- `gemini-omni` can also be invoked through this Seedance task API.
- `mode=t2v` is used for text-to-video, `mode=r2v` for generation with reference images/reference materials, and `mode=edit` for video editing.
- Text can be placed in the `text` item of `prompt` or `content`; images can be placed in `image_url / image_urls / reference_images / input_reference / content`; videos can be placed in `video_urls / content`.
- The duration field can use `duration` or `seconds`, and will be automatically mapped to the 4 / 6 / 8 / 10 second options.

MiniMax / Hailuo Invocation:
- `minimax-h3` can be invoked through this task API and supports text-to-video, image reference, and audio reference; text can be placed in the `prompt` or `content` text fields, and assets can be placed in fields such as `content`, `image_urls`, and `audio_urls`.
- `hailuo-2.3` can be invoked through this task API. A first-frame image is required. It is recommended to pass the `image_url` item of `role=first_frame` in `content`.
- `minimax-h3` commonly uses `duration=5~15` and `resolution=1440p`; `hailuo-2.3` commonly uses `duration=6` or `10` and `resolution=768p`.

Key fields in query results:
- `items[].status`
- `items[].content.video_url` or `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/en/openapi.json GET /api/v3/contents/generations/tasks/{task_id}
openapi: 3.0.0
info:
  title: Overseas Expansion Camp API Reference Documentation
  version: 1.0.0
  description: Public AI Gateway API Reference
servers:
  - url: https://api.aiid.edu.kg
security:
  - BearerAuth: []
tags:
  - name: OpenAI format (Chat)
  - name: OpenAI Format (Responses)
  - name: Gemini Format for Image Generation
  - name: Image generationOpenAI DALL-E format
  - name: List models
  - name: Video generationHappyHorse and Wan
  - name: Video generation Kling format
  - name: Video generation Omni and Veo formats
  - name: Video generation Seedance
  - name: Video generation Sora compatible formats
  - name: Video generation Vidu
  - name: Music generation task format
paths:
  /api/v3/contents/generations/tasks/{task_id}:
    get:
      tags:
        - Video generation Seedance
      summary: Query task (Seedance)
      description: >-
        This series supports OpenAI video generation formats (see the link
        [Video generation Sora compatible
        formats](/api-reference/en/video-generation-sora-compatible-format/create-video)).


        Used to create video generation tasks and query status and results via
        task ID.


        Core fields for task creation:

        - `model`: Required. Model name.

        - `prompt`: Required. Primary description for video generation.

        - `content`: Optional, the Volcano Ark content array, mixing text,
        image, video, and audio materials.

        - `function_mode`: Optional. Commonly used for advanced modes such as
        Omni-Reference.


        Compatible input parameters:


        The following fields are mainly used for compatibility with legacy
        clients and older protocols. For new integrations, please use the
        standard format in the “Request Example” on this page whenever possible:
        use the `content` array for text and reference materials, and use
        top-level `duration`, `ratio`, `resolution`, `fps`, and other fields for
        generation configuration.


        - `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`


        Call details:

        - When using `mode=reference_material` or
        `function_mode=omni_reference`, it is recommended to pass text and
        reference materials via `content`.

        - `content` text items are written as `{ "type": "text", "text": "测试文字"
        }`.

        - `content` image, video, and audio material items use the `image_url`,
        `video_url`, and `audio_url` object formats respectively, for example `{
        "type": "image_url", "image_url": { "url": "https://example.com/ref.png"
        }, "role": "reference_image", "name": "1" }`.

        - `role` can be used to identify the purpose of the material, and `name`
        can be referenced by name in prompts.

        - `ratio`, `duration`, `resolution`, and `fps` will affect the final
        generation configuration.


        Gemini Omni invocation:

        - `gemini-omni` can also be invoked through this Seedance task API.

        - `mode=t2v` is used for text-to-video, `mode=r2v` for generation with
        reference images/reference materials, and `mode=edit` for video editing.

        - Text can be placed in the `text` item of `prompt` or `content`; images
        can be placed in `image_url / image_urls / reference_images /
        input_reference / content`; videos can be placed in `video_urls /
        content`.

        - The duration field can use `duration` or `seconds`, and will be
        automatically mapped to the 4 / 6 / 8 / 10 second options.


        MiniMax / Hailuo Invocation:

        - `minimax-h3` can be invoked through this task API and supports
        text-to-video, image reference, and audio reference; text can be placed
        in the `prompt` or `content` text fields, and assets can be placed in
        fields such as `content`, `image_urls`, and `audio_urls`.

        - `hailuo-2.3` can be invoked through this task API. A first-frame image
        is required. It is recommended to pass the `image_url` item of
        `role=first_frame` in `content`.

        - `minimax-h3` commonly uses `duration=5~15` and `resolution=1440p`;
        `hailuo-2.3` commonly uses `duration=6` or `10` and `resolution=768p`.


        Key fields in query results:

        - `items[].status`

        - `items[].content.video_url` or `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: Query successful
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                    description: Task ID.
                  model:
                    type: string
                  status:
                    type: string
                    description: Task status.
                    enum:
                      - queued
                      - running
                      - succeeded
                      - failed
                  error:
                    type: object
                    nullable: true
                    properties:
                      code:
                        type: string
                      message:
                        type: string
                  created_at:
                    type: integer
                    description: Creation time (Unix seconds).
                  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: Task ID.
                        status:
                          type: string
                          description: >-
                            Task status, commonly `queued`, `running`,
                            `succeeded`, and `failed`.
                        content:
                          type: object
                          properties:
                            video_url:
                              type: string
                              description: Video result URL.
                        video_url:
                          type: string
                          description: Video result URL.
                        error:
                          type: string
                          description: Error message returned when the request fails.
                        progress:
                          type: string
                          description: Task progress.
      security:
        - BearerAuth: []
components:
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: |-
        Use Bearer Token authentication.
        Format: `Authorization: Bearer sk-xxxxxx`

````