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

# 非同步任務速率限制

> ToAPIs 非同步生成任務的提交與查詢限流

> [!NOTE]
>
> **中國大陸用戶請注意：** 中國大陸用戶請使用 `https://toapis.cn` 作為接口地址（Base URL）。文檔示例中的 `https://toapis.com` 請替換為 `https://toapis.cn`。

ToAPIs 為非同步任務提交與狀態查詢使用兩個獨立 token bucket，不消耗同步模型請求額度。

| 分組 | 提交 RPM / RPS / 突發 | 查詢 RPM / RPS / 突發 |
| - | - | - |
| `default` | 300 / 5 / 50 | 3,000 / 50 / 500 |
| `vip` | 1,000 / 16.7 / 167 | 10,000 / 166.7 / 1,667 |
| `svip` | 2,000 / 33.3 / 334 | 30,000 / 500 / 5,000 |

按使用者 ID 統計，同一使用者多個 Token 共用額度；提交與查詢隔離。業務失敗計數，`429` 不計數；批次查詢一次計一個請求，最多 100 個任務。

```text theme={null}
Retry-After
X-RateLimit-Limit
X-RateLimit-Remaining
X-RateLimit-Reset
X-RateLimit-Category: async_submit | async_query
```

```json 429 theme={null}
{"error":{"code":"rate_limit_exceeded","message":"Async task request rate exceeded"}}
```

```json 503 theme={null}
{"error":{"code":"rate_limit_unavailable","message":"The async task submit limiter is temporarily unavailable"}}
```

提交限流故障返回 `503 rate_limit_unavailable`，查詢降級放行。建議以 [Webhook](https://docs.toapis.com/docs/zh-Hant/api-reference/webhooks/task-webhooks.md) 為主，輪詢至少間隔 5～10 秒並加入隨機抖動；`429/503` 優先讀取 `Retry-After`，否則使用指數退避。


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