CAPTCHA basics
How to move a createTask client to GateSolver
If your code already speaks the JSON createTask and getTaskResult protocol, moving to GateSolver is mostly a configuration change. The work is in checking type names and fields, and testing before real traffic arrives.
What changes and what does not
The JSON protocol is the same: POST /createTask with clientKey and a task object, receive a taskId, then POST /getTaskResult until status is ready and read the solution. A third call, /getBalance, reports your balance in US dollars. All three live at https://gatesolver.com.
What changes: the base URL, the API key, and possibly a few type names or optional fields your client sends. What does not: your polling loop, your solution handling and the way you use answers on the target site.
Create a key and fund the account
Create an account (it is a single account token, so keep it safe; it cannot be recovered if lost), then create an API key in the account. The key is shown once. Each account has one key, and creating a new one replaces the old, so generate it once and distribute it to every place that needs it. Top up from $40 with one of 25 coin and network combinations; the balance never expires.
Replace the base URL
Find where your client stores the API host and change it. In most code it is one constant or an option on the client object.
// solver-config.mjs
export const solverConfig = {
baseUrl: process.env.SOLVER_BASE ?? "https://gatesolver.com",
apiKey: process.env.SOLVER_KEY,
pollTokenMs: 3000,
pollImageMs: 1000,
giveUpAfterMs: 125000,
};
Keep paths unchanged: /createTask, /getTaskResult and /getBalance sit directly under the base URL. Search the codebase for the old host as a string, including tests, fixtures and documentation snippets that developers copy from.
Test the connection with getBalance
getBalance is the ideal first call: it checks the URL, the key and your network path, and it costs nothing.
curl -s https://gatesolver.com/getBalance \
--json "{\"clientKey\":\"$SOLVER_KEY\"}"
The --json option needs curl 7.82 or newer and sets the POST method and JSON headers for you. An errorId of 0 with a balance means you are connected. ERROR_KEY_DENIED_ACCESS means the key is missing, mistyped or was replaced by a newer one. Add the same call to your service's startup or health check, so a misconfigured deployment fails loudly before it accepts work.
Check task type names
Type names are case-insensitive, and the common spellings are accepted, including older aliases such as NoCaptchaTaskProxyless for reCAPTCHA v2, RecaptchaV3TaskProxyless for v3 and TurnstileTaskProxyless for Turnstile. The full list is in the API docs. Collect every type value your code sends and compare:
- Found in the list: no change needed.
- Same CAPTCHA, different name: map it to the listed name in one place in your code.
- Type not offered: the API returns
ERROR_TASK_NOT_SUPPORTED, uncharged. GateSolver solves fourteen types; see the comparison for which.
Check the fields of each type
Field names follow the widely used conventions: websiteURL, websiteKey, pageAction, isInvisible, enterprisePayload, proxy, userAgent, body for images and so on. Compare the fields your client sends for each type with the type page. Points that often need attention:
- Proxies. GateSolver takes the proxy as one string,
http://user:pass@host:port, in aproxyfield. If your client sends separate fields for address, port, login and password, join them into that string. - Turnstile extras. Action and cdata values go in a
metadataobject, as described on the Cloudflare Turnstile page. - GeeTest. v3 needs
gtand a freshchallenge; v4 needscaptchaId. - Required proxies. Cloudflare Challenge and DataDome Slider require one; tasks without it fail validation.
A missing required field returns ERROR_INVALID_TASK_DATA with the field name in the description, so a test run quickly shows anything you missed.
Remove options that are not supported
Results are collected by polling only. If your client sends a callback URL with each task so answers can be pushed to it, remove that option or ignore it; nothing will be posted back, and your polling loop must be active. Also remove any calls to endpoints other than the three above, for example reporting incorrect answers or reading queue statistics, or guard them behind a flag that is off for GateSolver.
Send one real task per type
With the connection confirmed, run one task of each type your code uses. The public reCAPTCHA demo page is convenient for the v2 path:
import { solverConfig as cfg } from "./solver-config.mjs";
const send = (path, payload) => fetch(cfg.baseUrl + path, {
method: "POST", headers: { "Content-Type": "application/json; charset=utf-8" },
body: JSON.stringify({ clientKey: cfg.apiKey, ...payload }),
}).then((answer) => answer.json());
const demo = new URL("https://www.google.com/recaptcha/api2/demo");
const demoKey = "6Le-wvkSAAAAAPBMRTvw0Q4Muexq9bi0DJwx_mJ-";
const made = await send("/createTask", { task: {
type: "NoCaptchaTaskProxyless", websiteURL: demo.href, websiteKey: demoKey } });
console.log("created", made.errorId, made.taskId);
Using the old alias in this test is deliberate: it proves your existing type names work without edits. Poll the result with your existing loop and check that the token arrives, that the cost field matches the price per 1,000 for that type ($0.56 for reCAPTCHA v2), and that your code reads the solution fields it expects.
Align polling and timeouts
Poll token tasks about every three seconds and image tasks about every second. Unsolved tasks are failed after 120 seconds and cost nothing, so your client's give-up time should sit slightly above that. Keep total calls under 600 per minute per key, counting polls; there is no limit on how many tasks are in flight.
Switch production traffic
Deploy the new configuration to one worker or a small share of jobs first, watch the error codes, solve times and acceptance on the target sites for a day, then roll out to the rest. Because only the base URL and key differ, rolling back is just as simple. Once everything runs on the new host, remove the old key from your secrets store so it cannot be used by accident.
Common questions
Do I need to rename my task types?
Usually not. Type names are case-insensitive and common aliases such as NoCaptchaTaskProxyless are accepted. Check the docs list for anything unusual.
How can I test the new setup without spending balance?
Call getBalance. It checks the URL, key and network path and costs nothing.
Will answers be pushed to my callback URL?
No. Results are collected by polling getTaskResult. Remove the callback option and keep your polling loop active.
Why do I get ERROR_INVALID_TASK_DATA after switching?
A required field is missing or named differently, often the proxy format. The description names the field.
Can several services share one GateSolver key?
Yes. There is one key per account, and every service using it shares the 600 requests per minute limit and the balance.
Keep reading
- API docscreateTask, getTaskResult, getBalance, error codes and the in.php format.
- Moving an in.php client to GateSolverPoint an existing in.php and res.php client at GateSolver: change the base URL, check its methods, switch on json=1.
- What does ERROR_TASK_NOT_SUPPORTED mean?The task type is not one GateSolver recognizes; check its spelling against the 14 supported types and your widget.
- How do I replace a leaked API key?Create a new key in your account; it replaces the old one at once, so update every system using it.