# 接入地址

> YesCaptcha API 的两个节点：国际节点 api.yescaptcha.com 和国内节点 cn.yescaptcha.com；只接受 HTTPS POST JSON，在同一个节点创建和查询任务。

Source: https://docs.yescaptcha.com/zh/getting-started/endpoints/ · Last verified: 2026-10-15

YesCaptcha API 有两个节点，接口和参数完全相同，按你的服务器所在地选一个：

| 节点 | 地址 | 适合 |
| --- | --- | --- |
| 国际节点 | `https://api.yescaptcha.com` | 中国大陆以外的服务器 |
| 国内节点 | `https://cn.yescaptcha.com` | 中国大陆的服务器 |

接口地址 = 节点地址 + 方法名，例如创建任务：

- POST `https://api.yescaptcha.com/createTask` (国际节点)
- POST `https://cn.yescaptcha.com/createTask` (国内节点)

## 规则

-   只用 HTTPS。
-   除了 [`/useragent`](https://docs.yescaptcha.com/zh/api/useragent/)，所有方法都用 `POST`，请求体是 JSON，带上请求头 `Content-Type: application/json`。请求体不能超过 6 MB。
-   用请求体里的 `clientKey` 鉴权，不需要其他请求头。
-   在哪个节点创建的任务，就到哪个节点用 `getTaskResult` 查询，不要混用。

## 全部方法

| 方法 | 作用 | 说明 |
| --- | --- | --- |
| [`createTask`](https://docs.yescaptcha.com/zh/api/create-task/) | 创建任务 | 同步类型直接返回结果 |
| [`getTaskResult`](https://docs.yescaptcha.com/zh/api/get-task-result/) | 查询任务结果 | 异步类型每 5 秒查一次 |
| [`getBalance`](https://docs.yescaptcha.com/zh/api/get-balance/) | 查询余额 | 不扣点 |
| [`getSoftID`](https://docs.yescaptcha.com/zh/api/get-soft-id/) | 查询开发者 ID | 用于开发者分成 |
| [`report`](https://docs.yescaptcha.com/zh/api/report/) | 上报识别结果 | 图像识别类型可以申请返点 |
| [`useragent`](https://docs.yescaptcha.com/zh/api/useragent/) | 获取建议的 User-Agent | `GET`，hCaptcha 用 |

连不上接口时，看 [连接与网络问题](https://docs.yescaptcha.com/zh/help/troubleshooting/)。
