Developer Portal

API Documentation

Integrate CapByte in minutes with a simple REST API and predictable JSON responses.

REST APIJSONHTTPSAPI Key Authentication
Overview

Getting Started

CapByte is a REST API for solving hCaptcha challenges. Integration takes two calls: create a task, then poll for the result. Responses are predictable JSON, and every request is authenticated with your API key over HTTPS.

Base URL

base-url
https://capbyte.xyz
Security

Authentication

Every request requires an API key. Include it as the key field in the JSON body for POST requests, or as a query parameter for GET requests. Keep your key secret — treat it like a password.

auth.json
{
"key": "YOUR_API_KEY"
}
Endpoint

Create Task

POST/create_task

Creates a new hCaptcha solving task. Returns a task_id you can use to poll for the result.

Request — Basic

request.json
{
"key": "YOUR_API_KEY",
"type": "hcaptcha_basic",
"data": {
"sitekey": "SITE_KEY",
"siteurl": "https://example.com",
"proxy": "user:pass@ip:port"
}
}

Request — Enterprise

request.enterprise.json
{
"key": "YOUR_API_KEY",
"type": "enterprise",
"data": {
"sitekey": "SITE_KEY",
"siteurl": "https://example.com",
"proxy": "user:pass@ip:port",
"rqdata": "RQDATA",
"rqtoken": "RQTOKEN",
"user_agent": "Mozilla/5.0 ..."
}
}

Success Response

200.json
{
"status": "success",
"task_id": "abc123xyz"
}
Endpoint

Get Result

GET/get_result/{task_id}

Retrieves the status of an existing solve task. Poll this endpoint every 2 seconds until the status is no longer processing.

Example Request

request.http
GET https://capbyte.xyz/get_result/abc123xyz?key=YOUR_API_KEY

Processing

JSON
{
"status": "processing"
}

Solved

JSON
{
"status": "success",
"solution": "P1_xxxxxxxxxxxxxxxxx"
}

Failed

JSON
{
"status": "error",
"message": "Task failed."
}
Examples

Complete Python Example

A reusable solver class that creates a task and polls until the token is ready.

capbyte_solver.py
1import time
2import requests
3from typing import Optional, Tuple
4 
5class CapByteSolver:
6 def __init__(
7 self,
8 url: str,
9 sitekey: str,
10 rqdata: Optional[str] = None,
11 rqtoken: Optional[str] = None,
12 user_agent: Optional[str] = None,
13 proxy: Optional[str] = None,
14 api_key: str = "YOUR_API_KEY",
15 base_url: str = "https://capbyte.xyz"
16 ):
17 self.url = url
18 self.sitekey = sitekey
19 self.rqdata = rqdata
20 self.rqtoken = rqtoken
21 self.user_agent = user_agent
22 self.proxy = proxy
23 self.api_key = api_key
24 self.base_url = base_url.rstrip("/")
25 
26 def solve(self, timeout: int = 180, poll_interval: float = 2.0):
27 cleaned_proxy = None
28 
29 if self.proxy:
30 cleaned_proxy = self.proxy.replace("http://", "").replace("https://", "")
31 
32 payload = {
33 "key": self.api_key,
34 "type": "enterprise" if self.rqdata else "hcaptcha_basic",
35 "data": {
36 "sitekey": self.sitekey,
37 "siteurl": self.url,
38 "proxy": cleaned_proxy,
39 "rqdata": self.rqdata or "",
40 "rqtoken": self.rqtoken or "",
41 "user_agent": self.user_agent or ""
42 }
43 }
44 
45 if not cleaned_proxy:
46 payload["data"].pop("proxy", None)
47 
48 response = requests.post(
49 f"{self.base_url}/create_task",
50 json=payload
51 )
52 
53 task_id = response.json()["task_id"]
54 
55 while True:
56 time.sleep(2)
57 
58 result = requests.get(
59 f"{self.base_url}/get_result/{task_id}?key={self.api_key}"
60 ).json()
61 
62 if result["status"] == "success":
63 return result["solution"]
Examples

JavaScript Example

solve.js
1const axios = require("axios");
2 
3async function solve() {
4 const create = await axios.post(
5 "https://capbyte.xyz/create_task",
6 {
7 key: "YOUR_API_KEY",
8 type: "hcaptcha_basic",
9 data: {
10 sitekey: "SITE_KEY",
11 siteurl: "https://example.com"
12 }
13 }
14 );
15 
16 const taskId = create.data.task_id;
17 
18 while (true) {
19 await new Promise(r => setTimeout(r, 2000));
20 
21 const result = await axios.get(
22 `https://capbyte.xyz/get_result/${taskId}`,
23 {
24 params: {
25 key: "YOUR_API_KEY"
26 }
27 }
28 );
29 
30 if (result.data.status === "success") {
31 console.log(result.data.solution);
32 break;
33 }
34 }
35}
Examples

cURL Example

request.sh
curl -X POST https://capbyte.xyz/create_task \
-H "Content-Type: application/json" \
-d '{
"key": "YOUR_API_KEY",
"type": "hcaptcha_basic",
"data": {
"sitekey": "SITE_KEY",
"siteurl": "https://example.com"
}
}'
Reference

Parameters

FieldRequiredDescription
keyYesAPI key
typeYeshcaptcha_basic or enterprise
sitekeyYesWebsite sitekey
siteurlYesWebsite URL
proxyNoProxy in user:pass@ip:port format
rqdataEnterpriseEnterprise rqdata
rqtokenEnterpriseEnterprise rqtoken
user_agentEnterpriseBrowser User-Agent
Reference

Error Codes

401Unauthorized

Invalid API key

404Not Found

Task not found

429Too Many Requests

Too many requests

500Server Error

Internal server error

Reference

Rate Limits

  • Requests are processed on a first-come, first-served basis.
  • Clients should poll every 2 seconds when checking task status.
  • Avoid excessive polling to ensure efficient API usage.
Help

Frequently Asked Questions

Create an account and generate a key from your dashboard. Every request must include this key in the request body (or as the key query parameter for GET requests).

Ready to start integrating?

Generate an API key and drop CapByte into your workflow in minutes.