# 常见问题

## 先做这一步

在终端里用你的 Key 直接请求一次。这一步绕开了所有客户端，结果能告诉你问题在哪：

```bash
  curl -sS https://2api.dev/v1/models -H "Authorization: Bearer sk-你的Key"
  ```
  ```bash
  curl -sS https://2api.dev/v1/messages \
    -H "Authorization: Bearer sk-你的Key" \
    -H "anthropic-version: 2023-06-01" \
    -H "content-type: application/json" \
    -d '{"model":"模型名","max_tokens":16,"messages":[{"role":"user","content":"hi"}]}'
  ```
  ```bash
  curl -sS https://2api.dev/v1/responses \
    -H "Authorization: Bearer sk-你的Key" \
    -H "content-type: application/json" \
    -d '{"model":"模型名","input":"hi"}'
  ```
  Windows PowerShell 里把 `curl` 换成 `curl.exe`，并把 `\` 换行合并成一行。

| 自检结果 | 说明 | 去看 |
| --- | --- | --- |
| 正常返回内容 | Key 和地址都没问题，问题在客户端配置 | 对应工具的分类 |
| 返回 401 | Key 错了、被删了或被禁用 | [账号与额度](https://docs.2api.dev/faq/account/) |
| 返回 403 / 429 并带中文说明 | 额度、分组或限流问题，按提示处理 | [账号与额度](https://docs.2api.dev/faq/account/)、[网络与报错码](https://docs.2api.dev/faq/network/) |
| 提示模型不存在 | Key 和地址没问题，只是模型名不对 | 用 `/v1/models` 查模型名 |
| 连不上、超时 | 网络或代理问题 | [网络与报错码](https://docs.2api.dev/faq/network/) |

## 按分类找

<TileGrid>
  <LinkTile title="账号与额度" href="/faq/account/" icon="document">
    兑换失败、有额度却报错、额度什么时候重置、Key 和分组。
  </LinkTile>
  <LinkTile title="Claude Code" href="/faq/claude-code/" icon="seti:shell">
    一直要求登录、Invalid API key、认证冲突、模型不存在、扣费偏多。
  </LinkTile>
  <LinkTile title="Codex" href="/faq/codex/" icon="seti:config">
    401、stream disconnected、反复 Reconnecting、模型和推理档位。
  </LinkTile>
  <LinkTile title="其他客户端" href="/faq/clients/" icon="puzzle">
    /v1 重复、Cherry Studio、Cursor、CC Switch、magpie、Claude Desktop。
  </LinkTile>
  <LinkTile title="网络与报错码" href="/faq/network/" icon="warning">
    代理干扰、429、503、529、超时。
  </LinkTile>
</TileGrid>