NEWStandard createTask and in.php APIs. Change the address and you are connected.View API docs
GATESOLVER

Glossary

POST request: sending data to a server

A POST request carries data in its body to a server, which processes it: submitting a form, creating a record or, in a solving API, creating a task.

What makes POST different

Unlike GET, POST is neither safe nor idempotent by definition. Sending the same POST twice may create two orders, two comments or two tasks. Browsers warn before resubmitting a form for this reason, and HTTP clients do not retry POSTs automatically unless you tell them to. Keep that in mind when you build retry logic (see idempotency).

Body encodings

The Content-Type header tells the server how to read the body. Three encodings cover nearly everything you will meet.

Content-TypeBody looks likeWhere you see it
application/x-www-form-urlencodedemail=a%40b.com&g-recaptcha-response=03AF...Classic HTML forms, older APIs
application/json{"email":"a@b.com","token":"03AF..."}Single page apps, modern APIs
multipart/form-dataParts separated by a boundary, each with its own headersFile uploads, mixed forms

Send the encoding the server expects. A server that parses JSON will not see fields you sent as a form, and the error is often a vague 400 or a page that silently ignores your input. Copy the request from the browser's Network panel to see exactly what the site's own front end sends, and remember the body is usually JSON in modern apps.

createTask is a POST

Every call to the GateSolver JSON API is a POST with a JSON body. Creating a task looks like this with curl:

curl -s https://gatesolver.com/createTask \
  -H "Content-Type: application/json" \
  --data '{"clientKey":"YOUR_API_KEY","task":{"type":"ImageToTextTask","body":"iVBORw0KGgo..."}}'

The reply is {"errorId":0,"taskId":"..."}. Polling with /getTaskResult and checking the balance with /getBalance are POSTs too. The in.php compatible format also accepts form encoded POSTs, which is what the post method for image uploads uses. A full walkthrough is in solving a CAPTCHA with curl.

Posting a solved token to a site

After a task returns a token, you usually send it to the target with a POST. On a classic form, add it as a form field named g-recaptcha-response (reCAPTCHA) or cf-turnstile-response (Turnstile) together with the other fields. On a single page app, add it to the JSON body under whatever key the front end uses. Include the same cookies and a matching user agent, and post soon: a reCAPTCHA v2 token, which typically takes under 9 seconds, stays valid for about two minutes and works once.

form = {"email": "qa@example.com", "message": "test run 42",
        "g-recaptcha-response": token_value}
reply = session.post("https://example.com/contact", data=form, timeout=30)

Passing a dict as data sends it form encoded; passing it as json sends JSON. That one keyword is the most common reason a token "does not work".

Retrying POSTs safely

If a POST times out, you may not know whether the server processed it. For createTask, a duplicate only means a second task, and only solved tasks are billed, so a retry costs at most one extra solve. For a form submission on a target site, check whether the action already happened before sending it again.

Common questions

Is a POST request idempotent?

Not by definition. Sending it twice may create two records, so retries need care.

What is the difference between form encoded and JSON bodies?

Form encoding sends key=value pairs joined by ampersands; JSON sends a structured object. The server parses only the one it expects.

Which content type does createTask expect?

application/json, with clientKey and a task object in the body.

Why is my solved token ignored by the site?

Often it was sent in the wrong encoding or field name, or it expired before submission.

Do HTTP clients retry POST requests automatically?

Usually not, because a repeat could duplicate the action. You opt in explicitly when it is safe.

Keep reading