Solve a math captcha

Reads a sum like "19 + 20 = ?" from the image and returns sum, the number to type into the captcha box. Handles +, -, x / ×, / / ÷ and up to three numbers (multiplication and division first).

Request

POSThttps://captcha-solver.p.apihiver.com/v1/math

The captcha image, sent as a data URL or base64 string in data.

*
String. The captcha image as a data URL (data:image/png;base64,...) or plain base64. Up to 5 MB. You can also send a multipart "file" upload, or JSON with "base64" or "url".

Parameters and body structure are inherited from this endpoint's definition. Changes here only apply to this test run.

Language
Client
1curl --request POST \
2  --url https://captcha-solver.p.apihiver.com/v1/math \
3  --header 'Accept: application/json' \
4  --header 'Content-Type: application/x-www-form-urlencoded' \
5  --header 'X-API-Key: YOUR_API_KEY' \
6  --data 'data=data:image/png;base64,iVBORw0KGgo...'

Solve a math captcha: Captcha Solver API reference

Reads a sum like "19 + 20 = ?" from the image and returns `sum`, the number to type into the captcha box. Handles +, -, x / ×, / / ÷ and up to three numbers (multiplication and division first). This endpoint is part of the Captcha Solver API: Solve simple image captchas — math like "19 + 20 = ?" returns the sum, text captchas return the characters. Clean JSON.

Example response (200, application/json)

The captcha was read.

1{
2  "sum": 39,
3  "type": "math",
4  "image": {
5    "width": 150,
6    "height": 30
7  },
8  "answer": 39,
9  "method": "grey/psm7",
10  "question": "19+20 = ?",
11  "raw_text": "19+20=?",
12  "confidence": 95.9,
13  "expression": "19+20"
14}

Errors

  • 400 — The image was not valid base64, or an option was out of range.
    1{
    2  "error": {
    3    "code": "INVALID_INPUT",
    4    "message": "The image is not valid base64."
    5  }
    6}
  • 415 — The file is not an image we can read.
    1{
    2  "error": {
    3    "code": "UNSUPPORTED_IMAGE",
    4    "message": "That file isn't an image we can read (PNG, JPEG, WebP, GIF, BMP)."
    5  }
    6}

Gateway errors (missing key, no subscription, rate limits) are listed in Error codes.