<p class="crumbs"><a href="/zh/docs/">文档</a></p>

# 错误码

出错时返回：

```json
{
  "code": "insufficient_balance",
  "message": "This call costs 0.02 USD",
  "message_zh": "余额不足",
  "request_id": "req_…",
  "charged": false,
  "retry": "no",
  "retry_after_seconds": null,
  "docs": "https://feedmcp.com/docs/errors/#insufficient_balance",
  "top_up_url": "https://feedmcp.com/console/top-up/"
}
```

`retry` 的取值：`no` 不要重试；`yes` 可以重试；`once` 稍后重试一次；`after_fix` 改了参数再试；`same_key` 用同一个 Idempotency-Key 重试。

| code | HTTP | 说明 | retry | 扣费 |
| --- | --- | --- | --- | --- |
| <a id="invalid_params"></a>`invalid_params` | 400 | 参数不对 | `after_fix` | 不扣 |
| <a id="price_above_max"></a>`price_above_max` | 400 | 这次调用的价格高于你设的 X-Max-Price | `after_fix` | 不扣 |
| <a id="unauthorized"></a>`unauthorized` | 401 | 缺少或无效的 API Key | `after_fix` | 不扣 |
| <a id="insufficient_balance"></a>`insufficient_balance` | 402 | 余额不足 | `no` | 不扣 |
| <a id="key_spend_cap_reached"></a>`key_spend_cap_reached` | 402 | 这把 Key 已达到你设的花费上限 | `no` | 不扣 |
| <a id="forbidden"></a>`forbidden` | 403 | 没有权限 | `no` | 不扣 |
| <a id="not_found"></a>`not_found` | 404 | 对象不存在，或已删除、设为不可见 | `no` | 不扣 |
| <a id="video_too_long"></a>`video_too_long` | 422 | 视频超过 2 分钟，这个平台只能转写 2 分钟以内的视频 | `no` | 不扣 |
| <a id="unknown_endpoint"></a>`unknown_endpoint` | 404 | 没有这个接口 | `no` | 不扣 |
| <a id="idempotency_conflict"></a>`idempotency_conflict` | 409 | 同一个 Idempotency-Key 用在了不同的请求上 | `after_fix` | 不扣 |
| <a id="rate_limited"></a>`rate_limited` | 429 | 调用太频繁 | `yes` | 不扣 |
| <a id="upstream_error"></a>`upstream_error` | 502 | 平台暂时取不到数据 | `once` | 不扣 |
| <a id="free_quota_paused"></a>`free_quota_paused` | 503 | 今天的免费试用额度已用完，明天恢复；有余额的账户不受影响 | `yes` | 不扣 |
| <a id="upstream_timeout"></a>`upstream_timeout` | 504 | 平台响应超时 | `same_key` | 不扣 |
| <a id="internal_error"></a>`internal_error` | 500 | 服务内部错误 | `same_key` | 不扣 |

---

网页版: https://feedmcp.com/zh/docs/errors/
