# Endpoints

> The two YesCaptcha API endpoints, global api.yescaptcha.com and China cn.yescaptcha.com. HTTPS POST with JSON only; create and query a task on the same endpoint.

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

The YesCaptcha API has two endpoints with identical methods and parameters. Pick the one closer to your servers:

| Endpoint | Address | Use it for |
| --- | --- | --- |
| Global | `https://api.yescaptcha.com` | Servers outside mainland China |
| China | `https://cn.yescaptcha.com` | Servers in mainland China |

A method URL is the endpoint plus the method name, for example creating a task:

- POST `https://api.yescaptcha.com/createTask` (Global endpoint)
- POST `https://cn.yescaptcha.com/createTask` (China endpoint)

## Rules

-   HTTPS only.
-   Every method except [`/useragent`](https://docs.yescaptcha.com/en/api/useragent/) uses `POST` with a JSON body and the header `Content-Type: application/json`. The body must be under 6 MB.
-   Authentication is the `clientKey` in the body; no other headers are needed.
-   Query a task with `getTaskResult` on the same endpoint you created it on. Don’t mix endpoints.

## All methods

| Method | Purpose | Notes |
| --- | --- | --- |
| [`createTask`](https://docs.yescaptcha.com/en/api/create-task/) | Create a task | Synchronous types return the result directly |
| [`getTaskResult`](https://docs.yescaptcha.com/en/api/get-task-result/) | Get the task result | Poll every 5 seconds for asynchronous types |
| [`getBalance`](https://docs.yescaptcha.com/en/api/get-balance/) | Get the balance | Free |
| [`getSoftID`](https://docs.yescaptcha.com/en/api/get-soft-id/) | Get your developer ID | For the developer revenue share |
| [`report`](https://docs.yescaptcha.com/en/api/report/) | Report results | Image recognition types can be refunded |
| [`useragent`](https://docs.yescaptcha.com/en/api/useragent/) | Get the recommended User-Agent | `GET`, used with hCaptcha |

If you cannot connect, see [Connection troubleshooting](https://docs.yescaptcha.com/en/help/troubleshooting/).
