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

# Seedance 2.0 Video Generation — Query Task and Status

> GET /v1/result/{id} — Poll for Seedance 2.0 video task status. Returns video_url and totalTokens when completed. Download the MP4 within 1 day.

After you create a Seedance 2.0 video generation task, use this endpoint to check its status and retrieve the download URL once generation is complete. Pass the `id` returned by the [Create Video Task](/api-reference/video/seedance2-create) endpoint as the path parameter, and keep polling until `status` is `"completed"` or `"failed"`.

<Note>
  Video generation is **asynchronous**. Fast model variants (`seedance_2_0_fast`, `seedance_2_0_fast_pro`) typically complete sooner and can be polled at shorter intervals.
</Note>

## Endpoint

```
Base URL:  https://zcbservice.aizfw.cn/kyyReactApiServer
Endpoint:  GET /v1/result/{id}
Full URL:  https://zcbservice.aizfw.cn/kyyReactApiServer/v1/result/{id}
```

All requests must include your API key as a Bearer token:

```
Authorization: Bearer YOUR_API_KEY
```

## Path Parameters

<ParamField path="id" type="string" required>
  The unique task identifier returned by the [Create Video Task](/api-reference/video/seedance2-create) endpoint.

  Example: `video_fd35ee52-2a98-44a6-b930-29a88ce9b8fd`
</ParamField>

## Response Fields

<ResponseField name="id" type="string">
  Unique identifier of the video generation task.
</ResponseField>

<ResponseField name="object" type="string">
  Object type. Always `"video"`.
</ResponseField>

<ResponseField name="created" type="integer">
  Unix timestamp (seconds) of when the task was created.
</ResponseField>

<ResponseField name="model" type="string">
  The Seedance 2.0 model used for generation. One of: `seedance_2_0`, `seedance_2_0_fast`, `seedance_2_0_pro`, `seedance_2_0_fast_pro`.
</ResponseField>

<ResponseField name="status" type="string">
  Current task status:

  * `queued` — task is in the queue, waiting to be processed
  * `processing` — the model is actively generating the video
  * `completed` — generation succeeded; `video_url` is populated
  * `failed` — generation failed; see `error` for details
</ResponseField>

<ResponseField name="video_url" type="string">
  A direct download URL for the generated MP4 video. Only present when `status` is `"completed"`. Valid for **1 day** — download and store the video promptly.
</ResponseField>

<ResponseField name="actualDuration" type="number">
  The actual output duration of the video in seconds. Only present when `status` is `"completed"`.
</ResponseField>

<ResponseField name="totalTokens" type="integer">
  The total number of tokens consumed by this generation task. Only present when `status` is `"completed"`. Use this value for cost tracking and quota management.
</ResponseField>

<ResponseField name="error" type="string">
  Error message describing why the task failed. Only present when `status` is `"failed"`.
</ResponseField>

## Status Flow

| Step | Status       | Meaning                                        |
| ---- | ------------ | ---------------------------------------------- |
| 1    | `queued`     | Task created and added to the processing queue |
| 2    | `processing` | Seedance 2.0 model is generating the video     |
| 3    | `completed`  | Video is ready; retrieve it via `video_url`    |
| —    | `failed`     | An error occurred; inspect the `error` field   |

## Polling Recommendations

<Tip>
  Use a **20–40 second** polling interval as the default. For fast model variants, you can shorten this to **10–20 seconds**.
</Tip>

| Model                   | Recommended Poll Interval | Estimated Generation Time |
| ----------------------- | ------------------------- | ------------------------- |
| `seedance_2_0`          | every 20–40 s             | 2–5 min                   |
| `seedance_2_0_fast`     | every 10–20 s             | 1–3 min                   |
| `seedance_2_0_pro`      | every 20–40 s             | 3–6 min                   |
| `seedance_2_0_fast_pro` | every 10–20 s             | 2–4 min                   |

* Stop polling immediately when `status` is `"completed"` or `"failed"`.
* Avoid polling more frequently than every 10 seconds to prevent rate limiting.

**Factors that affect generation time:**

* **Video duration:** longer durations take more time
* **Model type:** fast variants generate more quickly
* **Reference media:** adding multi-modal references (images, videos, audio) may increase processing time
* **System load:** peak usage periods may result in longer queue times

## Video URL Notes

<Warning>
  The `video_url` is valid for **1 day** after the task completes. Download and save the MP4 file to your own storage promptly — the URL cannot be recovered after expiry.
</Warning>

* Format: **MP4**
* Audio: present if `generateAudio` was `true` during task creation; silent if `false`
* Retention: **1 day**

## Code Examples

<CodeGroup>
  ```bash cURL theme={null}
  curl --request GET \
    --url https://zcbservice.aizfw.cn/kyyReactApiServer/v1/result/video_fd35ee52-2a98-44a6-b930-29a88ce9b8fd \
    --header 'Authorization: Bearer YOUR_API_KEY'
  ```

  ```python Python theme={null}
  import time
  import requests

  BASE_URL = "https://zcbservice.aizfw.cn/kyyReactApiServer"
  API_KEY = "YOUR_API_KEY"
  TASK_ID = "video_fd35ee52-2a98-44a6-b930-29a88ce9b8fd"

  headers = {"Authorization": f"Bearer {API_KEY}"}

  # Use a shorter interval for fast model variants
  POLL_INTERVAL = 20

  while True:
      response = requests.get(
          f"{BASE_URL}/v1/result/{TASK_ID}",
          headers=headers,
      )
      data = response.json()
      status = data["status"]
      print(f"Status: {status}")

      if status == "completed":
          print(f"Video URL: {data['video_url']}")
          print(f"Actual duration: {data.get('actualDuration')}s")
          print(f"Tokens used: {data.get('totalTokens')}")
          break
      elif status == "failed":
          print(f"Generation failed: {data.get('error')}")
          break

      time.sleep(POLL_INTERVAL)
  ```
</CodeGroup>

**Example response — queued:**

```json theme={null}
{
  "id": "video_fd35ee52-2a98-44a6-b930-29a88ce9b8fd",
  "object": "video",
  "created": 1774836724,
  "model": "seedance_2_0_fast",
  "status": "queued",
  "video_url": null,
  "error": null
}
```

**Example response — completed:**

```json theme={null}
{
  "id": "video_fd35ee52-2a98-44a6-b930-29a88ce9b8fd",
  "object": "video",
  "created": 1774836724,
  "model": "seedance_2_0_fast",
  "status": "completed",
  "video_url": "https://cdn.example.com/videos/video_fd35ee52.mp4",
  "actualDuration": 8,
  "totalTokens": 1240,
  "error": null
}
```
