Glossary
Image CAPTCHA
An image CAPTCHA is the classic text challenge: a picture of warped letters or digits that the visitor reads and types into a field.
Definition
The first CAPTCHAs were images of words with noise, curves and overlapping characters. The server generates a random string, renders it as a distorted picture, stores the expected answer in the session, and compares what the visitor types. There is no third party vendor in many cases: libraries in PHP, Python, Java and .NET generate these images in a few lines, so they remain common on older forums, government portals, regional banks and internal tools.
Their simplicity is also their weakness. Modern OCR models trained on distorted text read most of them reliably, which is why large sites moved to widgets with behavioural checks. For small and legacy sites, the text image is still everywhere.
How OCR based solving works
A solving service receives the image, runs it through recognition models suited to the style (thin lines, dotted noise, colour backgrounds, rotated characters), and returns the most likely string. With GateSolver this is the Image to Text task. You send the image as base64 without the data:image/...;base64, prefix and get back plain text:
import base64, requests
with open("captcha.png", "rb") as fh:
pic = base64.b64encode(fh.read()).decode()
r = requests.post("https://gatesolver.com/createTask", timeout=30, json={
"task": {"type": "ImageToTextTask", "body": pic}, "clientKey": "YOUR_API_KEY"}).json()
print(r["taskId"]) # then poll getTaskResult every second
The result looks like {"text": "gs7k2"}. Image tasks cost $0.28 per 1,000 solved and typically return under 1 seconds, so poll every second instead of every three.
Case, length and character set
Three properties decide whether a correct reading is also an accepted one:
- Case. Some sites compare case sensitively, so
Ab3andab3differ. Enter the text exactly as returned; if the site is case insensitive, lowercasing is harmless. - Length. Most generators use a fixed length, often four to six characters. If a returned answer has the wrong length, treat it as a likely misread and request a new image rather than submitting.
- Character set. Many generators avoid look-alikes such as 0 and O or 1 and l. Knowing the set lets you post-process: map O to 0 on digit-only CAPTCHAs, for example.
The task also accepts an optional module to pick a recognition model for a known style, and a score threshold between 0.8 and 1 to make the solver stricter about confidence.
Getting a clean image
Capture the exact image the session expects. Text CAPTCHAs are tied to the server session, so downloading the image URL in a separate client produces a different picture than the one your form session holds. In a browser, take a screenshot of the image element; with an HTTP client, fetch the image URL with the same cookies you will submit the form with. Avoid resizing or re-compressing it before sending.
Some sites draw the CAPTCHA on a canvas element instead of an img tag. In that case read it with canvas.toDataURL() from the page context, strip the prefix and send the rest. Animated GIF CAPTCHAs, which flash parts of the text across frames, are rare today; if you meet one, capture the frame where all characters are visible or combine frames before solving.
Legacy in.php support
If your code was written for the classic in.php interface, the same solving is available through method=base64 or a multipart method=post upload with json=1, and results arrive through res.php. That makes migrating old scripts a matter of changing the host.
When the image is not text
If the picture asks you to choose objects in a grid, it is an image classification CAPTCHA; if it asks you to drag or rotate, see slider CAPTCHA. Each needs a different task type. The Python guide for image CAPTCHAs walks through a full loop with retries on wrong answers.
Common questions
Do I need to remove the data:image prefix?
Yes. Send only the base64 characters after the comma; the prefix makes the image unreadable for the task.
What if the returned text has the wrong length?
Treat it as a likely misread, load a fresh image and solve again rather than submitting a guess.
Why is my correct answer rejected?
The image you solved probably came from a different session. Fetch it with the same cookies the form uses.
Can I solve image CAPTCHAs through in.php?
Yes. Use method=base64 or method=post with json=1, then read the answer from res.php.
How often should I poll image tasks?
About once per second, since text images finish much faster than token widgets.
Keep reading
- Solve image text CAPTCHAs in PythonDownload the distorted text image in the form session, base64 it, send ImageToTextTask and type the answer back with the right case.
- Image classification CAPTCHAGrid puzzles that ask you to select every tile with a bus or a crosswalk, and how solvers return tile indexes.
- AI image recognition and CAPTCHAsHow recognition models read distorted text, pick grid tiles and place slider pieces, and why visual tests alone no longer stop machines.
- Image to Text solver$0.28 per 1,000 tasks, answers under 1 seconds.