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

# 任务查询与轮询

> 通过 task_id 查询 Seedance 视频生成任务状态与结果（gogogotoken.ai）

[提交视频任务](/overseas/video-generations) 后，使用返回的 `task_id` 轮询查询进度与结果。

<RequestExample>
  ```bash cURL theme={null}
  curl https://gogogotoken.ai/v1/video/generations/task_1234567890 \
    -H "Authorization: Bearer YOUR_API_KEY"
  ```
</RequestExample>

<ResponseExample>
  ```json 处理中 theme={null}
  {
    "status": "running",
    "progress": 50
  }
  ```

  ```json 生成成功 theme={null}
  {
    "id": "task_1234567890",
    "status": "completed",
    "progress": 100,
    "output": {
      "video_url": "https://assets.example.com/generated-video.mp4"
    },
    "usage": {
      "total_tokens": 108900,
      "completion_tokens": 108900
    }
  }
  ```
</ResponseExample>

## 路径参数

<ParamField path="task_id" type="string" required>
  视频生成任务 ID，由提交接口返回。
</ParamField>

## 轮询建议

状态通常按以下顺序变化：

```text theme={null}
queued → running → completed / failed
```

* 建议每 **5–8 秒** 查询一次
* 成功后的视频 URL **有时效**，请尽快下载保存
* OpenAI 兼容查询：`GET /v1/videos/{task_id}`

## 常见问题

**一直 queued / failed？**

检查 API Key 余额、分组是否支持该模型。

**completed 但没有 video\_url？**

不同响应格式字段可能为 `result_url` 或 `output.video_url`，以实际 JSON 为准。
