API Documentation
Integrate CapByte in minutes with a simple REST API and predictable JSON responses.
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
https://capbyte.xyz
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.
{"key": "YOUR_API_KEY"}
Create Task
/create_taskCreates a new hCaptcha solving task. Returns a task_id you can use to poll for the result.
Request — Basic
{"key": "YOUR_API_KEY","type": "hcaptcha_basic","data": {"sitekey": "SITE_KEY","siteurl": "https://example.com","proxy": "user:pass@ip:port"}}
Request — Enterprise
{"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
{"status": "success","task_id": "abc123xyz"}
Get Result
/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
GET https://capbyte.xyz/get_result/abc123xyz?key=YOUR_API_KEY
Processing
{"status": "processing"}
Solved
{"status": "success","solution": "P1_xxxxxxxxxxxxxxxxx"}
Failed
{"status": "error","message": "Task failed."}
Complete Python Example
A reusable solver class that creates a task and polls until the token is ready.
1import time2import requests3from typing import Optional, Tuple45class CapByteSolver:6def __init__(7self,8url: str,9sitekey: str,10rqdata: Optional[str] = None,11rqtoken: Optional[str] = None,12user_agent: Optional[str] = None,13proxy: Optional[str] = None,14api_key: str = "YOUR_API_KEY",15base_url: str = "https://capbyte.xyz"16):17self.url = url18self.sitekey = sitekey19self.rqdata = rqdata20self.rqtoken = rqtoken21self.user_agent = user_agent22self.proxy = proxy23self.api_key = api_key24self.base_url = base_url.rstrip("/")2526def solve(self, timeout: int = 180, poll_interval: float = 2.0):27cleaned_proxy = None2829if self.proxy:30cleaned_proxy = self.proxy.replace("http://", "").replace("https://", "")3132payload = {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}4445if not cleaned_proxy:46payload["data"].pop("proxy", None)4748response = requests.post(49f"{self.base_url}/create_task",50json=payload51)5253task_id = response.json()["task_id"]5455while True:56time.sleep(2)5758result = requests.get(59f"{self.base_url}/get_result/{task_id}?key={self.api_key}"60).json()6162if result["status"] == "success":63return result["solution"]
JavaScript Example
1const axios = require("axios");23async function solve() {4const create = await axios.post(5"https://capbyte.xyz/create_task",6{7key: "YOUR_API_KEY",8type: "hcaptcha_basic",9data: {10sitekey: "SITE_KEY",11siteurl: "https://example.com"12}13}14);1516const taskId = create.data.task_id;1718while (true) {19await new Promise(r => setTimeout(r, 2000));2021const result = await axios.get(22`https://capbyte.xyz/get_result/${taskId}`,23{24params: {25key: "YOUR_API_KEY"26}27}28);2930if (result.data.status === "success") {31console.log(result.data.solution);32break;33}34}35}
cURL Example
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"}}'
Parameters
| Field | Required | Description |
|---|---|---|
key | Yes | API key |
type | Yes | hcaptcha_basic or enterprise |
sitekey | Yes | Website sitekey |
siteurl | Yes | Website URL |
proxy | No | Proxy in user:pass@ip:port format |
rqdata | Enterprise | Enterprise rqdata |
rqtoken | Enterprise | Enterprise rqtoken |
user_agent | Enterprise | Browser User-Agent |
Error Codes
Invalid API key
Task not found
Too many requests
Internal server error
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.
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.