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

# API quickstart

> Three steps to a solved captcha. You send one request; SafeConduct picks the provider that works best on that site, retries on another if it fails, and charges only for the solve.

Base URL: `https://api.safeconduct.ai`

**1. Get a key**

Create a key in the console and copy it. It starts with `sy_live_`. Keep it in an environment variable, here `SAFECONDUCT_KEY`. [API keys](https://docs.safeconduct.ai/api-keys.md) has every step.

**2. Send a captcha**

One call that waits for the token. If your bot already uses a 2Captcha or Anti-Captcha client, keep it and change only the server and the key.

```bash curl theme={null}
curl https://api.safeconduct.ai/v1/tasks/solve \
  -H "Authorization: Bearer $SAFECONDUCT_KEY" \
  -d '{
  "type": "recaptcha_v2",
  "websiteURL": "https://www.google.com/recaptcha/api2/demo",
  "websiteKey": "6Le-wvkSAAAAAPBMRTvw0Q4Muexq9bi0DJwx_mJ-"
}'
```

```python Python theme={null}
import os, requests

r = requests.post(
    "https://api.safeconduct.ai/v1/tasks/solve",
    headers={"Authorization": f"Bearer {os.environ['SAFECONDUCT_KEY']}"},
    json={
      "type": "recaptcha_v2",
      "websiteURL": "https://www.google.com/recaptcha/api2/demo",
      "websiteKey": "6Le-wvkSAAAAAPBMRTvw0Q4Muexq9bi0DJwx_mJ-"
    },
)
print(r.json())
```

```javascript Node.js theme={null}
const res = await fetch("https://api.safeconduct.ai/v1/tasks/solve", {
  method: "POST",
  headers: { Authorization: `Bearer ${process.env.SAFECONDUCT_KEY}` },
  body: JSON.stringify({
    "type": "recaptcha_v2",
    "websiteURL": "https://www.google.com/recaptcha/api2/demo",
    "websiteKey": "6Le-wvkSAAAAAPBMRTvw0Q4Muexq9bi0DJwx_mJ-"
  }),
});
console.log(await res.json());
```

```go Go theme={null}
body := strings.NewReader(`{
  "type": "recaptcha_v2",
  "websiteURL": "https://www.google.com/recaptcha/api2/demo",
  "websiteKey": "6Le-wvkSAAAAAPBMRTvw0Q4Muexq9bi0DJwx_mJ-"
}`)
req, _ := http.NewRequest("POST", "https://api.safeconduct.ai/v1/tasks/solve", body)
req.Header.Set("Authorization", "Bearer "+os.Getenv("SAFECONDUCT_KEY"))

res, err := http.DefaultClient.Do(req)
```

```python 2captcha-python theme={null}
import os
from twocaptcha import TwoCaptcha

solver = TwoCaptcha(os.environ["SAFECONDUCT_KEY"], server="api.safeconduct.ai")
result = solver.recaptcha(sitekey="6Le-wvkSAAAAAPBMRTvw0Q4Muexq9bi0DJwx_mJ-", url="https://www.google.com/recaptcha/api2/demo")
print(result["code"])
```

> [!NOTE]
>
> **Drop-in.** Clients written for Anti-Captcha, CapSolver, CapMonster or 2Captcha work unchanged: the [three ways in](https://docs.safeconduct.ai/index.md#three-ways-in).

**3. Read the answer**

The answer has the token and a receipt: who solved it, what it cost, and every attempt.

```json Example answer theme={null}
{
  "id": "01JC8Z9Q4F2QH6V3M0T7XK5R1B",
  "type": "recaptcha_v2",
  "status": "ready",
  "site": "google.com",
  "policy": "balanced",
  "reserved": "0.0028",
  "solution": {
    "token": "03AFcWeA5kQ…"
  },
  "provider": "capsolver",
  "cost": "0.0008",
  "attempts": [
    {
      "n": 1,
      "provider": "capsolver",
      "durationMs": 13382
    }
  ],
  "createdAt": "2026-11-18T10:15:02Z",
  "finishedAt": "2026-11-18T10:15:16Z"
}
```

| Field | What it is |
| - | - |
| `solution` | The token to submit to the site. |
| `provider` | The provider that solved it. |
| `cost` | What you paid: that provider's list price. |
| `attempts` | Every provider tried, in order. A failed attempt costs nothing. |

## If a site rejects the token

Say so within an hour. Routing learns which provider really works on that site. It isn't refunded.

```bash curl theme={null}
curl https://api.safeconduct.ai/v1/tasks/TASK_ID/report \
  -H "Authorization: Bearer $SAFECONDUCT_KEY" \
  -d '{"verdict": "incorrect"}'
```

## Go further

> [card] [Settings](https://docs.safeconduct.ai/settings.md)
>
> Routing policy, providers, limits and a daily cap, per key.

> [card] [How routing works](https://docs.safeconduct.ai/routing.md)
>
> How a provider is chosen, and what happens when one fails.

> [card] [Pricing](https://docs.safeconduct.ai/pricing.md)
>
> What a solve costs, and the two ways to pay.

> [card] [API reference](https://docs.safeconduct.ai/reference/introduction.md)
>
> Every call, field and answer, generated from the OpenAPI file.


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