> ## Documentation Index
> Fetch the complete documentation index at: https://docs.newapi.si/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`: Optional; if not provided, `content` must include a non-empty text item.
- `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.

Seedance 2.5 Mixed image, video, and audio reference example (the asset URLs are placeholders; replace them with actual accessible links when calling):

```json
{
  "model": "sd-2-5",
  "ratio": "9:16",
  "fps": 24,
  "duration": 10,
  "content": [
    {
      "type": "text",
      "text": "使用 @图片1 @图片2 @图片3 @音频1 参考@视频1 生成视频"
    },
    {
      "type": "image_url",
      "image_url": {
        "url": "https://demo1.png"
      },
      "role": "reference_image",
      "name": "图片1"
    },
    {
      "type": "image_url",
      "image_url": {
        "url": "https://demo2.png"
      },
      "role": "reference_image",
      "name": "图片2"
    },
    {
      "type": "image_url",
      "image_url": {
        "url": "https://demo3.png"
      },
      "role": "reference_image",
      "name": "图片3"
    },
    {
      "type": "video_url",
      "video_url": {
        "url": "https://video.mp4"
      },
      "role": "reference_video",
      "name": "视频1"
    },
    {
      "type": "audio_url",
      "audio_url": {
        "url": "https://audio.mp3"
      },
      "role": "reference_audio",
      "name": "音频1"
    }
  ]
}
```

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

 Kling 4.0 requests: `kling-4.0` (720p) and `kling-4.0-1080p` both support the Seedance `content/duration/resolution/ratio/mode` format, `contents/settings/options`, and the OpenAI video format; the two unified video endpoints can reuse the same request body. The resolution must match the model name. Kling 4.0 can use either the Seedance format with content/duration/resolution/ratio/mode, or the OpenAI video format with prompt/seconds/size/input_reference; neither requires additional contents/settings/options. The mode can be t2v (text only), i2v (single first frame), i2v_first_last (first and last frames), reference_images (standard reference images), or reference_material (all-purpose reference materials; audio requires a route that supports this capability). If mode is omitted and no explicit tool is specified, reference_material is used by default when reference materials are provided; otherwise, t2v is used. Reference modes treat inputs as standard reference images and do not silently reinterpret explicitly provided first and last frames as reference images. For first and last frames, explicitly select i2v or i2v_first_last and omit the aspect ratio parameter. Kling 4.0 generates audio and video together by default. All-purpose reference mode supports public audio URLs: use audio_urls with /v1/videos, and the audio_url item in content with Seedance; a route that supports audio materials is required. The three native dedicated endpoints currently do not accept reference audio fields.

Vidu Q4: `vidu-q4` is fixed at 720p, and `vidu-q4-540p` is fixed at 540p. Supports generating videos from 3 to 16 seconds. At least 1 image is required, with up to 15 reference images supported. Reference generation can include up to 3 MP3 audio clips, each 3 to 12 seconds long and up to 50 MB. Pure text-to-video, specified first and last frames, and reference videos are not supported. Multiple images are used as joint references and do not indicate first or last frame positions. Tasks can be created via `POST /v1/videos`, `POST /api/v3/contents/generations/tasks`, or the Vidu formats `POST /ent/v2/img2video` and `POST /ent/v2/reference2video`. For the unified endpoint, `mode=reference_images` is recommended; use `mode=reference_material` when including audio. Reference audio can use `audio_urls`. The Seedance format can also use the `audio_url` field of the standard `content`; the `audio` Boolean field controls audio generation and is used separately from the reference audio URL list. The resolution must match the model name.

### Magi-2 1080p

`magi-2-1080p` supports both the OpenAI `/v1/videos` and Ark `/api/v3/contents/generations/tasks` formats. Query each format using the corresponding path's `GET /{task_id}`. Resolution is fixed at 1080p, with a generation duration of 4–30 seconds. Supported aspect ratios are 16:9, 9:16, 1:1, 4:3, 3:4, and 21:9; 1:1 output is 1440×1440. Reference mode supports up to 10 images, 5 video clips, and 5 audio clips, for a total of 20 assets. Each video and audio clip must be 2–30 seconds long. The combined duration of all videos must not exceed 30 seconds, and the combined duration of all audio must not exceed 30 seconds. The size limit is 30 MB for images, 200 MB for videos, and 15 MB for audio. First-and-last-frame mode cannot be combined with other image, video, or audio references. Prompts can use `<<<image_1>>>`, `<<<video_1>>>`, and `<<<audio_1>>>` to reference assets in the order they were provided for each type. There is currently no separate entry point for the official sand.ai format.

```json
{
  "model": "magi-2-1080p",
  "duration": 4,
  "resolution": "1080p",
  "ratio": "1:1",
  "content": [
    {
      "type": "text",
      "text": "以 <<<image_1>>> 的彩色积木为主体，参考 <<<video_1>>> 的缓慢转动及 <<<audio_1>>> 的轻柔节奏。"
    },
    {
      "type": "image_url",
      "image_url": {
        "url": "https://example.com/blocks.png"
      },
      "role": "reference_image"
    },
    {
      "type": "video_url",
      "video_url": {
        "url": "https://example.com/rotation.mp4"
      },
      "role": "reference_video"
    },
    {
      "type": "audio_url",
      "audio_url": {
        "url": "https://example.com/rhythm.wav"
      },
      "role": "reference_audio"
    }
  ]
}
```

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.newapi.si
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`: Optional; if not provided, `content` must include a
        non-empty text item.

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


        Seedance 2.5 Mixed image, video, and audio reference example (the asset
        URLs are placeholders; replace them with actual accessible links when
        calling):


        ```json

        {
          "model": "sd-2-5",
          "ratio": "9:16",
          "fps": 24,
          "duration": 10,
          "content": [
            {
              "type": "text",
              "text": "使用 @图片1 @图片2 @图片3 @音频1 参考@视频1 生成视频"
            },
            {
              "type": "image_url",
              "image_url": {
                "url": "https://demo1.png"
              },
              "role": "reference_image",
              "name": "图片1"
            },
            {
              "type": "image_url",
              "image_url": {
                "url": "https://demo2.png"
              },
              "role": "reference_image",
              "name": "图片2"
            },
            {
              "type": "image_url",
              "image_url": {
                "url": "https://demo3.png"
              },
              "role": "reference_image",
              "name": "图片3"
            },
            {
              "type": "video_url",
              "video_url": {
                "url": "https://video.mp4"
              },
              "role": "reference_video",
              "name": "视频1"
            },
            {
              "type": "audio_url",
              "audio_url": {
                "url": "https://audio.mp3"
              },
              "role": "reference_audio",
              "name": "音频1"
            }
          ]
        }

        ```


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

         Kling 4.0 requests: `kling-4.0` (720p) and `kling-4.0-1080p` both support the Seedance `content/duration/resolution/ratio/mode` format, `contents/settings/options`, and the OpenAI video format; the two unified video endpoints can reuse the same request body. The resolution must match the model name. Kling 4.0 can use either the Seedance format with content/duration/resolution/ratio/mode, or the OpenAI video format with prompt/seconds/size/input_reference; neither requires additional contents/settings/options. The mode can be t2v (text only), i2v (single first frame), i2v_first_last (first and last frames), reference_images (standard reference images), or reference_material (all-purpose reference materials; audio requires a route that supports this capability). If mode is omitted and no explicit tool is specified, reference_material is used by default when reference materials are provided; otherwise, t2v is used. Reference modes treat inputs as standard reference images and do not silently reinterpret explicitly provided first and last frames as reference images. For first and last frames, explicitly select i2v or i2v_first_last and omit the aspect ratio parameter. Kling 4.0 generates audio and video together by default. All-purpose reference mode supports public audio URLs: use audio_urls with /v1/videos, and the audio_url item in content with Seedance; a route that supports audio materials is required. The three native dedicated endpoints currently do not accept reference audio fields.

        Vidu Q4: `vidu-q4` is fixed at 720p, and `vidu-q4-540p` is fixed at
        540p. Supports generating videos from 3 to 16 seconds. At least 1 image
        is required, with up to 15 reference images supported. Reference
        generation can include up to 3 MP3 audio clips, each 3 to 12 seconds
        long and up to 50 MB. Pure text-to-video, specified first and last
        frames, and reference videos are not supported. Multiple images are used
        as joint references and do not indicate first or last frame positions.
        Tasks can be created via `POST /v1/videos`, `POST
        /api/v3/contents/generations/tasks`, or the Vidu formats `POST
        /ent/v2/img2video` and `POST /ent/v2/reference2video`. For the unified
        endpoint, `mode=reference_images` is recommended; use
        `mode=reference_material` when including audio. Reference audio can use
        `audio_urls`. The Seedance format can also use the `audio_url` field of
        the standard `content`; the `audio` Boolean field controls audio
        generation and is used separately from the reference audio URL list. The
        resolution must match the model name.


        ### Magi-2 1080p


        `magi-2-1080p` supports both the OpenAI `/v1/videos` and Ark
        `/api/v3/contents/generations/tasks` formats. Query each format using
        the corresponding path's `GET /{task_id}`. Resolution is fixed at 1080p,
        with a generation duration of 4–30 seconds. Supported aspect ratios are
        16:9, 9:16, 1:1, 4:3, 3:4, and 21:9; 1:1 output is 1440×1440. Reference
        mode supports up to 10 images, 5 video clips, and 5 audio clips, for a
        total of 20 assets. Each video and audio clip must be 2–30 seconds long.
        The combined duration of all videos must not exceed 30 seconds, and the
        combined duration of all audio must not exceed 30 seconds. The size
        limit is 30 MB for images, 200 MB for videos, and 15 MB for audio.
        First-and-last-frame mode cannot be combined with other image, video, or
        audio references. Prompts can use `<<<image_1>>>`, `<<<video_1>>>`, and
        `<<<audio_1>>>` to reference assets in the order they were provided for
        each type. There is currently no separate entry point for the official
        sand.ai format.


        ```json

        {
          "model": "magi-2-1080p",
          "duration": 4,
          "resolution": "1080p",
          "ratio": "1:1",
          "content": [
            {
              "type": "text",
              "text": "以 <<<image_1>>> 的彩色积木为主体，参考 <<<video_1>>> 的缓慢转动及 <<<audio_1>>> 的轻柔节奏。"
            },
            {
              "type": "image_url",
              "image_url": {
                "url": "https://example.com/blocks.png"
              },
              "role": "reference_image"
            },
            {
              "type": "video_url",
              "video_url": {
                "url": "https://example.com/rotation.mp4"
              },
              "role": "reference_video"
            },
            {
              "type": "audio_url",
              "audio_url": {
                "url": "https://example.com/rhythm.wav"
              },
              "role": "reference_audio"
            }
          ]
        }

        ```


        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`

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.