Getting Started
Set up your first integration with CapBypass
Getting Started
This guide will help you integrate the CapBypass API into your application in minutes.
Prerequisites
- A CapBypass API key (Get one here)
- HTTP client (curl, axios, fetch, requests, etc.)
Authentication
All requests require a clientKey in the request body:
{
"clientKey": "your-api-key",
...
}Keep your API key secret
Never expose your API key in client-side code or public repositories. Use environment variables or a backend proxy.
API Endpoints
| Endpoint | Description |
|---|---|
POST /createTask | Create a new solving task |
POST /getTaskResult | Get the result of a task |
POST /getBalance | Check your account balance |
Base URL: https://api.capbypass.pro
Creating Your First Task
Create a Task
const response = await fetch('https://api.capbypass.pro/createTask', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
clientKey: 'your-api-key',
task: {
type: 'ReCaptchaV3TaskProxyLess',
websiteURL: 'https://example.com',
websiteKey: '6LdyC2cUAAAAACGuDKpXeDorzUDWXmdqeg-xy696',
pageAction: 'login'
}
})
});
const { taskId } = await response.json();
console.log('Task created:', taskId);import requests
response = requests.post('https://api.capbypass.pro/createTask', json={
'clientKey': 'your-api-key',
'task': {
'type': 'ReCaptchaV3TaskProxyLess',
'websiteURL': 'https://example.com',
'websiteKey': '6LdyC2cUAAAAACGuDKpXeDorzUDWXmdqeg-xy696',
'pageAction': 'login'
}
})
task_id = response.json()['taskId']
print(f'Task created: {task_id}')curl -X POST https://api.capbypass.pro/createTask \
-H 'Content-Type: application/json' \
-d '{
"clientKey": "your-api-key",
"task": {
"type": "ReCaptchaV3TaskProxyLess",
"websiteURL": "https://example.com",
"websiteKey": "6LdyC2cUAAAAACGuDKpXeDorzUDWXmdqeg-xy696",
"pageAction": "login"
}
}'Poll for Results
async function getResult(taskId) {
while (true) {
const response = await fetch('https://api.capbypass.pro/getTaskResult', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
clientKey: 'your-api-key',
taskId
})
});
const result = await response.json();
if (result.status === 'ready') {
return result.solution;
}
if (result.status === 'failed') {
throw new Error(result.errorDescription);
}
// Wait 1 second before polling again
await new Promise(r => setTimeout(r, 1000));
}
}
const solution = await getResult(taskId);
console.log('Token:', solution.gRecaptchaResponse);import time
def get_result(task_id):
while True:
response = requests.post('https://api.capbypass.pro/getTaskResult', json={
'clientKey': 'your-api-key',
'taskId': task_id
})
result = response.json()
if result['status'] == 'ready':
return result['solution']
if result['status'] == 'failed':
raise Exception(result['errorDescription'])
time.sleep(1)
solution = get_result(task_id)
print(f"Token: {solution['gRecaptchaResponse']}")Response Format
Success Response (reCAPTCHA)
{
"errorId": 0,
"status": "ready",
"solution": {
"gRecaptchaResponse": "03AGdBq24PBCb...",
"userAgent": "Mozilla/5.0 ...",
"secChUa": "\"Chromium\";v=\"136\", ..."
}
}Success Response (AWS WAF)
{
"errorId": 0,
"status": "ready",
"solution": {
"cookie": "aws-waf-token=xxxxxxxx...",
"token": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx:...",
"userAgent": "Mozilla/5.0 ..."
}
}Processing Response
{
"errorId": 0,
"status": "processing"
}Error Response
{
"errorId": 1,
"errorCode": "ERROR_CAPTCHA_UNSOLVABLE",
"errorDescription": "Unable to solve the challenge"
}Error Codes
| Error Code | Description |
|---|---|
ERROR_KEY_DOES_NOT_EXIST | Invalid API key |
ERROR_ZERO_BALANCE | Insufficient balance |
ERROR_CAPTCHA_UNSOLVABLE | Challenge could not be solved |
ERROR_TASK_NOT_FOUND | Task ID not found |
ERROR_INVALID_TASK_DATA | Missing or invalid parameters |
ERROR_PROXY_NOT_DEFINED | Proxy required for a non-ProxyLess task type — use the ProxyLess variant or supply task.proxy |
ERROR_PROXY_CONNECTION_FAILED | Could not connect through your proxy (refused, unreachable, or bad credentials) - check the proxy is alive and reachable |
ERROR_PROXY_BANNED | The target blocked your proxy IP (datacenter or flagged) - use a residential or mobile proxy |
ERROR_INVALID_DEVELOPER_KEY | The provided developerKey is invalid or disabled |
ERROR_WRONG_TASK_TYPE | Wrong task type for this site (e.g., standard vs enterprise) |
ERROR_TIMEOUT | Task exceeded timeout |
ERROR_TASK_QUEUE_FULL | Server is at capacity — retry in a few seconds |
ERROR_TASK_TYPE_COMING_SOON | Task type is not yet available |
ERROR_TASK_TYPE_INACTIVE | Task type is currently disabled |
ERROR_WORKER_CRASHED | Solver process exited mid-solve — balance refunded, safe to retry |
ERROR_INTERNAL | Internal server error |
SDKs
TypeScript / JavaScript
npm install @capbypass/sdk
Python
pip install capbypass-sdk
Go
go get github.com/CapBypass-Development/capbypass-sdk-go