Captcha OCR API (1.1.0)

Download OpenAPI specification:

Solve image, audio, text-question, slider and rotate captchas: numeric, text, arithmetic, ten Indian scripts. ₹25 per 1,000; pay only for reliable answers.

Send a captcha image, get back the text to type, a confidence score, and a reliable flag that says whether it is worth submitting.

Two ways to call it.

  • Call and wait: POST /v1/solve returns the answer in the same request, in about 25 ms for text and 6 ms for math captchas. POST /v1/solve_batch does up to 256 at once.
  • Submit, then fetch: POST /v1/submit returns a task id immediately and solves the captcha in the background. GET /v1/result/{id} returns processing, then ready with the answer. Add ?wait=10 to hold the request until the answer is ready (up to 30 s) instead of polling. Results are kept 48 hours.
Options Engine Reads
(default), or numeric: true ocr numeric codes (482915) and alphanumeric text, case kept; symbols: true adds punctuation
math: true math arithmetic captchas (14 + 9 = ? → 23, 84 ÷ 7, 3 + 4 x 2)
math: true, hindi: true hindi_math Hindi number words or Devanagari digits (इकतीस + 6 = ?, ३१ + ६); returns the answer
math: true, words: true word_math English number words (seven plus 3 = ?); returns the answer. Beta
script: "tamil" (or another Indian script) indic_ocr text in Devanagari, Bengali, Assamese, Gurmukhi, Gujarati, Odia, Tamil, Telugu, Kannada or Malayalam. Beta

Other kinds of captcha, each with its own endpoint (same key, same price per reliable answer):

Endpoint Engine Send Get back
POST /v1/solve_audio audio the audio of the "play audio" button (WAV or MP3, base64) the spoken code in text (eCourts / High Court Securimage audio and similar)
POST /v1/solve_question question the question as text ("What is seven plus 3?", Hindi too) the answer in text
POST /v1/solve_slider slider the background, plus the piece image if the page has one x (and y): the gap's left edge in background pixels
POST /v1/solve_rotate rotate the inner disc and the outer ring image angle: degrees to turn the disc clockwise

color: "red" (or orange, yellow, green, cyan, blue, purple, pink, black) reads only the characters drawn in that colour, for "type the red characters" captchas. Beta engines and the colour filter were measured on synthetic captchas only.

Pricing. ₹25 per 1,000 solves (packs from ₹100), and only answers with reliable: true are charged. Unreadable images and low-confidence reads are free.

Balance and alerts. GET /v1/balance returns your credits. Set one low-balance alert with PUT /v1/alert: when your credits drop below its threshold, we POST your JSON payload to your URL.

Authentication. Authorization: Bearer <API key> (or X-API-Key: <API key>). Create keys on the dashboard.

Quickstart

  1. Sign up on the website. New accounts get 5,000 free credits and one API key.
  2. Create an API key on the dashboard (API keys → New key). The key is shown once.
  3. Send a captcha:
curl -s https://captchaocr.allvoraz.com/v1/solve \
  -H "Authorization: Bearer $CAPTCHA_API_KEY" \
  -H 'Content-Type: application/json' \
  -d "{\"image\": \"$(base64 < captcha.png | tr -d '\n')\", \"numeric\": true, \"length\": 6}"
# {"text":"482915","confidence":0.99,"reliable":true,"engine":"ocr","raw":"482915",
#  "expression":null,"error":null,"id":184467,"charged":true}

Official SDKs: Python, TypeScript/JavaScript, Go, Java, Kotlin, C#, PHP, Ruby, Rust, Swift and Dart. Every operation below shows each language's call.

Two ways to call

Call and wait Submit, then fetch
Endpoints POST /v1/solve (or /v1/solve_batch) POST /v1/submit, then GET /v1/result/{id}
First response the answer {"id": 184467, "status": "processing"}, at once
Use it when you need the answer to continue (most form fills) you queue captchas, or your HTTP client must not block

Both take the same body and options, cost the same, and return the same answer object.

Submit, then fetch. POST /v1/submit reserves a credit, stores the task, and returns its id with HTTP 202 before solving. The captcha is solved in the background, usually within 0.1 s. GET /v1/result/{id} returns:

status Meaning
processing Not done yet. Ask again in ~0.5 s, or pass ?wait=10.
ready result holds the answer (same fields as /v1/solve). Check result.reliable.
failed The solver couldn't run. error says why; the credit was returned. Submit again.

?wait=N (0-30) holds the request until the task finishes or N seconds pass, so one request usually returns the answer without a polling loop. Results are kept 48 hours; another key's task ids return 404. A key may have up to 256 unfinished tasks (429 beyond that).

curl -s https://captchaocr.allvoraz.com/v1/submit -H "Authorization: Bearer $CAPTCHA_API_KEY" \
  -H 'Content-Type: application/json' -d '{"image": "<base64>", "numeric": true, "length": 6}'
# {"id": 184467, "status": "processing"}
curl -s "https://captchaocr.allvoraz.com/v1/result/184467?wait=10" -H "Authorization: Bearer $CAPTCHA_API_KEY"
# {"id": 184467, "status": "ready", "result": {"text": "482915", "reliable": true, ...}, "error": null}

Authentication

Send your API key with every request, either as Authorization: Bearer <key> or as X-API-Key: <key>. Keys are created and revoked on the dashboard. A revoked key stops working within 30 seconds. Keep keys on your server: anyone holding a key can spend its credits.

Pricing and billing

  • 1 credit = 1 reliable answer. A captcha costs a credit only when the response has reliable: true. Undecodable images (error) and low-confidence reads are returned free.
  • Credits are prepaid in packs (₹100, ₹1,000, ₹5,000) by card, UPI (Google Pay, PhonePe, Paytm) or netbanking. They work out to ₹25, ₹22 and ₹20 per 1,000 solves.
  • Every response carries an X-Credits-Remaining header. GET /v1/balance returns the balance.
  • A request needs enough credits for all of its images up front (402 insufficient_credits otherwise). The uncharged ones are returned before the response is sent; for /v1/submit, when the task finishes.

Choosing options

Describe the captcha, not the answer you want. Each option you set removes wrong readings the model could otherwise make.

Captcha looks like Send
482915, always 6 digits numeric: true, length: 6
14 + 9 = ? (answer: 23) math: true
PUKLX8, capitals and digits uppercase: true, numeric: true
hyi5ag, site ignores case lowercase: true, numeric: true
7rX2Yx, mixed case, case matters nothing (case is kept as read)
बयालीस - 6 = ? (answer: 36) math: true, hindi: true
84 ÷ 7 or 12 + 7 − 4 math: true
seven plus 3 = ? (answer: 10), beta math: true, words: true
k#7@Q2, with punctuation, beta symbols: true
தமிழ் ௩௭, Tamil letters and digits, beta script: "tamil"
ৰৱাম, Assamese (Bengali letters with ৰ ৱ), beta script: "assamese"
"Type only the red characters", beta color: "red" plus the usual options
  • numeric alone also turns look-alike letters into digits (O → 0, l → 1, S → 5).
  • uppercase or lowercase alone folds the other case into it, and turns look-alike digits into letters (0 → O).
  • length is enforced by the decoder: it returns the most likely reading of exactly that many characters. Set it whenever the site's captchas have a fixed length.
  • math returns the computed answer in text and the expression it computed in expression. × and ÷ are applied before + and −; a division that is not exact is not answered.
  • hindi reads Hindi number words, ASCII digits and Devanagari digits (३१) on either side.
  • words (with math) reads English number words and operators: "twenty one minus four".
  • script reads letters and digits in one of ten Indic scripts: devanagari, bengali, assamese, gurmukhi, gujarati, odia, tamil, telugu, kannada, malayalam. text is Unicode (NFC); native digits are kept as drawn. Add numeric: true for a digits-only captcha. urdu, arabic, cyrillic and chinese are in the API but not yet enabled on the hosted service (they return model_unavailable).
  • color keeps only the characters of one colour (red, orange, yellow, green, cyan, blue, purple, pink, black) and works with every other option.
  • Invalid combinations are rejected with 422: hindi/words without math, hindi with words, script or symbols with math, and script with uppercase, lowercase or symbols.

Types marked beta are measured on synthetic captchas only, not yet on live ones.

Audio, text-question, slider and rotate captchas

Four kinds of captcha are not a picture of text. Each has its own endpoint; the key, the price (1 credit per reliable answer) and the reliable rule are the same.

Captcha Endpoint Send Answer
"Play audio" button POST /v1/solve_audio audio: the sound, base64 (WAV or MP3) text: the spoken code
A question in plain text POST /v1/solve_question question: the text text: the answer
Drag the piece into the gap POST /v1/solve_slider image: the background; piece: the piece image, if the page has one x, y: the gap's left and top edge
Turn the disc to fit the ring POST /v1/solve_rotate image: the inner disc; ring: the outer ring angle: degrees clockwise
  • Audio reads Securimage audio (the PHP captcha of the eCourts district-court and High Court portals): its recordings of A-Z, 0-20, "plus", "minus" and "times" under background noise. On 120 real captchas from both portals it read every one. Audio has no letter case, so letters come back lower case (uppercase: true for capitals); a spoken sum comes back computed, with the sum in expression. Audio in another voice comes back unreliable rather than wrong. Set length when the form says how many characters to type.
  • Questions: sums in digits or words, English or Hindi ("What is seven plus 3?", "पाँच जोड़ तीन कितना होता है?", "Subtract 4 from 10"); biggest / smallest; the nth letter, digit or word; counting letters, digits, words or members of a kind; "Which of these is a colour / animal / fruit ..."; odd one out; days of the week and months ("If tomorrow is Saturday, what day is today?"); spaced codes, reversed words and numbers in words; a few common facts. A question it does not recognise comes back with empty text, unreliable and free.
  • Slider: x is in pixels of the background image you sent. The drag distance is x minus where the piece starts; scale it if the page shows the image resized. With the piece image (a transparent PNG cut-out, or a full-height strip), the gap is found by matching the piece's outline and pixels against the background (method: "piece"). Without it, a model trained on slider puzzles points at the gap from the background alone (method: "model"; y is null).
  • Rotate: for captchas with an inner disc that turns inside a fixed outer ring. Send the disc as image and the ring as ring; angle is how many degrees to turn the disc clockwise. The disc is lined up with the ring by matching colours across the cut. Picture-only rotate captchas (turn a photo upright, no ring) are not supported yet: they come back with error: "model_unavailable", unreliable and free.

Acting on the result

if result.error:          the image couldn't be decoded (not charged): re-download it
elif result.reliable:     submit result.text (charged)
else:                     refresh the captcha and solve the new one (not charged)

confidence is the probability of the least certain character. reliable combines it with engine-specific checks: the length matched, a math answer is non-negative, a Hindi number word was read exactly.

Balance and low-balance alert

GET /v1/balance returns {"credits": N, "alert_threshold": T} (alert_threshold is null without an alert). Every solve response also carries the balance in the X-Credits-Remaining header.

Each account can have one low-balance alert. When a solve leaves your credits below its threshold, we POST your JSON payload to your url, so your team hears about it before captchas start failing with 402.

curl -s -X PUT https://captchaocr.allvoraz.com/v1/alert -H "Authorization: Bearer $CAPTCHA_API_KEY" \
  -H 'Content-Type: application/json' -d '{
    "threshold": 500,
    "url": "https://hooks.example.org/captcha-credits",
    "payload": {"text": "Captcha credits low: {{credits}} left (alert at {{threshold}})"},
    "headers": {"Authorization": "Bearer my-hook-secret"}
  }'
Field Meaning
threshold Fire when credits drop below this (1 or more).
url Your HTTPS endpoint. It must resolve to a public address.
payload Optional JSON object, up to 8 KB. In strings, {{credits}}, {{threshold}} and {{time}} are filled in; a value that is exactly "{{credits}}" becomes a number. Default: {"event": "low_balance", "credits": N, "threshold": T}.
headers Optional, up to 10, e.g. Authorization so your endpoint can check the call is ours.

How it behaves:

  • It fires once per drop below the threshold, then armed becomes false. Buying credits that bring the balance back to the threshold or above re-arms it.
  • We POST with Content-Type: application/json and X-CaptchaOCR-Event: low_balance, and treat any 2xx as delivered. Otherwise we retry after 10 s and 60 s. Redirects are not followed.
  • PUT /v1/alert replaces your alert and arms it. GET /v1/alert shows it with the last delivery (last_fired_at, last_status, last_error). DELETE /v1/alert removes it.
  • POST /v1/alert/test sends it right now with your current balance and returns {"delivered": true, "status": 200, "error": null}, without changing armed.

Wrong answers and refunds

If a site rejects an answer that was reliable, call POST /v1/report with the answer's id (from /v1/solve, or the task id from /v1/submit) within 48 hours, and the credit is returned. Refunds per day are capped at 10% of that day's charged solves (plus 5).

Batches

POST /v1/solve_batch takes up to 256 images, solves them in parallel, and returns results in request order. The top-level options apply to every image. An item can override any of them:

{
  "numeric": true,
  "images": [
    {"image": "<base64>"},
    {"image": "<base64>", "length": 5},
    {"image": "<base64>", "math": true}
  ]
}

A plain base64 string works as shorthand for {"image": "<base64>"}. A bad image fails only its own slot.

Errors

Status Body What to do
200 with error: "invalid_image" Solved The image can't be decoded. Not charged. Re-download it.
401 {"detail": "invalid_api_key"} Check the key; it may have been revoked.
402 {"detail": "insufficient_credits", "credits": N} Buy credits on the dashboard.
422 HTTPValidationError Invalid options (unknown field, hindi without math, length outside 1-32, >256 images). Fix the request; don't retry.
404 {"detail": "unknown_task"} / "no_alert" /v1/result: no such task for this key, or older than 48 hours. /v1/alert: none set.
429 {"detail": "too_many_concurrent_requests"} More than 32 requests in flight (or 256 unfinished submitted tasks) on one key. Retry after Retry-After.
503 {"detail": "solver_unavailable"} Temporary. Retry with backoff. Credits were returned.

Task API

Besides /v1, the API offers task-style endpoints for normal (image) captchas, the createTask / getTaskResult shape many captcha integrations already use. Point such a client at this API's host and send your key as clientKey.

Endpoint / field Behaviour
POST /createTask with ImageToTextTask returns a taskId at once; solved in the background
POST /getTaskResult status: "processing", then "ready" (usually within 0.1 s)
POST /getBalance balance is in credits
POST /reportIncorrect / reportCorrect refunds as above
numeric 1 / 2 digits only / letters only
minLength = maxLength exact length
math: true arithmetic; add "languagePool": "hi" (or task.hindi: true) for Hindi number words

Low-confidence reads come back as ERROR_CAPTCHA_UNSOLVABLE and are not charged.

Limits

  • About 25 ms per text captcha and 6 ms per math captcha, plus network time.
  • Up to 32 concurrent requests per key, 256 unfinished submitted tasks per key, 256 images per batch, 5 MB per image.
  • Reuse one SDK client (HTTP keep-alive) rather than creating one per call.

Versioning

The API and every SDK share one semantic version. Adding fields is a minor release, and clients must ignore unknown response fields. Removing or renaming a field is a major release.

solve

Read captchas. Each reliable answer costs 1 credit.

Solve one captcha

Read one captcha. Check reliable before submitting the answer: only reliable answers are charged, and the others are returned free so you can decide.

Authorizations:
bearerAuthapiKeyHeader
Request Body schema: application/json
required
math
boolean (Math)
Default: false

Arithmetic captcha ("14 - 10 = ?", "6 x 3", "84 ÷ 7", "3 + 4 + 5"); text is the computed answer.

hindi
boolean (Hindi)
Default: false

Operands are Hindi number words or Devanagari digits ("इकतीस + 6 = ?", "बीस - पाँच", "३१ + ६"). Requires math.

words
boolean (Words)
Default: false

Operands are English number words ("seven plus 3 = ?", "What is twenty-one minus four?"). Requires math. Beta.

script
string (Script)
Default: "latin"
Enum: "latin" "devanagari" "bengali" "assamese" "gurmukhi" "gujarati" "odia" "tamil" "telugu" "kannada" "malayalam" "cyrillic" "arabic" "urdu" "chinese"

Text captcha in another script, read as written. Indic: devanagari (Hindi, Marathi, Nepali), bengali, assamese (with ৰ and ৱ), gurmukhi (Punjabi), gujarati, odia, tamil, telugu, kannada, malayalam. Not yet enabled on the hosted service (they return model_unavailable there): cyrillic (Russian, Ukrainian, Belarusian), arabic (Arabic and Persian letters and digits), urdu (Urdu letters such as ٹ ڈ ڑ ں ے and Urdu digits; Arabic and Urdu are returned in typing order) and chinese (simplified characters; with math, prompts such as "三加五等于几"). latin (the default) is the usual A-Z / 0-9 reader. With numeric, only the script's digits. Only chinese combines with math (use hindi for Devanagari sums). Beta.

numeric
boolean (Numeric)
Default: false

The captcha may contain digits 0-9.

uppercase
boolean (Uppercase)
Default: false

The captcha may contain letters A-Z. Alone, lowercase readings are folded to uppercase.

lowercase
boolean (Lowercase)
Default: false

The captcha may contain letters a-z. Alone, uppercase readings are folded to lowercase.

symbols
boolean (Symbols)
Default: false

The captcha may also contain punctuation (@ # $ % & * + - = ? ! and similar). Latin text only.

Color (string) or Color (null) (Color)

Read only the characters drawn in this colour ("type the red characters"); everything else is ignored. Beta.

Length (integer) or Length (null) (Length)

Exact number of characters. The decoder returns the most likely reading of exactly this length. Ignored when math is set or script is not latin.

image
required
string (Image) [ 1 .. 7000000 ] characters

Base64-encoded captcha image: PNG, JPEG, GIF, WebP, TIFF, BMP or SVG, detected by content. A data:image/...;base64, prefix is accepted.

Responses

Request samples

Content type
application/json
{
  • "image": "iVBORw0KGgoAAAANSUhEUgAA...",
  • "length": 6,
  • "numeric": true
}

Response samples

Content type
application/json
{
  • "confidence": 0.97,
  • "engine": "ocr",
  • "raw": "A9D411",
  • "reliable": true,
  • "text": "A9D411"
}

Solve many captchas

Up to 256 images in parallel; top-level options apply to every image and each item may override them. Credits for every image are reserved first (402 if the balance can't cover the batch), then the unreliable ones are returned.

Authorizations:
bearerAuthapiKeyHeader
Request Body schema: application/json
required
math
boolean (Math)
Default: false

Arithmetic captcha ("14 - 10 = ?", "6 x 3", "84 ÷ 7", "3 + 4 + 5"); text is the computed answer.

hindi
boolean (Hindi)
Default: false

Operands are Hindi number words or Devanagari digits ("इकतीस + 6 = ?", "बीस - पाँच", "३१ + ६"). Requires math.

words
boolean (Words)
Default: false

Operands are English number words ("seven plus 3 = ?", "What is twenty-one minus four?"). Requires math. Beta.

script
string (Script)
Default: "latin"
Enum: "latin" "devanagari" "bengali" "assamese" "gurmukhi" "gujarati" "odia" "tamil" "telugu" "kannada" "malayalam" "cyrillic" "arabic" "urdu" "chinese"

Text captcha in another script, read as written. Indic: devanagari (Hindi, Marathi, Nepali), bengali, assamese (with ৰ and ৱ), gurmukhi (Punjabi), gujarati, odia, tamil, telugu, kannada, malayalam. Not yet enabled on the hosted service (they return model_unavailable there): cyrillic (Russian, Ukrainian, Belarusian), arabic (Arabic and Persian letters and digits), urdu (Urdu letters such as ٹ ڈ ڑ ں ے and Urdu digits; Arabic and Urdu are returned in typing order) and chinese (simplified characters; with math, prompts such as "三加五等于几"). latin (the default) is the usual A-Z / 0-9 reader. With numeric, only the script's digits. Only chinese combines with math (use hindi for Devanagari sums). Beta.

numeric
boolean (Numeric)
Default: false

The captcha may contain digits 0-9.

uppercase
boolean (Uppercase)
Default: false

The captcha may contain letters A-Z. Alone, lowercase readings are folded to uppercase.

lowercase
boolean (Lowercase)
Default: false

The captcha may contain letters a-z. Alone, uppercase readings are folded to lowercase.

symbols
boolean (Symbols)
Default: false

The captcha may also contain punctuation (@ # $ % & * + - = ? ! and similar). Latin text only.

Color (string) or Color (null) (Color)

Read only the characters drawn in this colour ("type the red characters"); everything else is ignored. Beta.

Length (integer) or Length (null) (Length)

Exact number of characters. The decoder returns the most likely reading of exactly this length. Ignored when math is set or script is not latin.

required
Array of objects (Images) [ 1 .. 256 ] items

1-256 images, solved in parallel; results come back in the same order. A plain base64 string is accepted as shorthand for {"image": ...}.

Responses

Request samples

Content type
application/json
{
  • "images": [
    ],
  • "numeric": true
}

Response samples

Content type
application/json
{
  • "results": [
    ]
}

Solve an audio captcha

Read the code spoken in an audio captcha (the sound its play-audio button gives), such as the Securimage audio of the eCourts and High Court portals. Letters come back lower case (audio has no case; set uppercase for capitals); a spoken sum comes back computed.

Authorizations:
bearerAuthapiKeyHeader
Request Body schema: application/json
required
audio
required
string (Audio) [ 1 .. 12000000 ] characters

Base64-encoded audio: WAV (PCM or float, any sample rate) or MP3 / OGG / FLAC. A data:audio/...;base64, prefix is accepted. Up to 60 seconds.

Length (integer) or Length (null) (Length)

Exact number of characters, when the form says.

uppercase
boolean (Uppercase)
Default: false

Return letters in upper case. Audio carries no letter case, so letters come back lower case by default.

Responses

Request samples

Content type
application/json
{
  • "audio": "UklGRiQAAABXQVZFZm10IBAAAAABAAEA..."
}

Response samples

Content type
application/json
{
  • "confidence": 0.97,
  • "engine": "ocr",
  • "raw": "A9D411",
  • "reliable": true,
  • "text": "A9D411"
}

Answer a text-question captcha

Answer a captcha asked in plain text instead of an image: arithmetic in digits or words (English and Hindi), biggest / smallest, the nth letter or word, counting, "which of these is a colour", odd one out, days and months. An unrecognised question comes back empty and free.

Authorizations:
bearerAuthapiKeyHeader
Request Body schema: application/json
required
question
required
string (Question) [ 1 .. 1000 ] characters

The question as shown on the page (English or Hindi), e.g. "What is seven plus 3?" or "What is the 3rd letter in the word 'garden'?".

Responses

Request samples

Content type
application/json
{
  • "question": "What is seven plus 3?"
}

Response samples

Content type
application/json
{
  • "confidence": 0.97,
  • "engine": "ocr",
  • "raw": "A9D411",
  • "reliable": true,
  • "text": "A9D411"
}

Find the gap in a slider captcha

Where to drag the piece: x is the gap's left edge in pixels of the background image. Send the piece image with it.

Authorizations:
bearerAuthapiKeyHeader
Request Body schema: application/json
required
image
required
string (Image) [ 1 .. 7000000 ] characters

Base64 background image (the picture with the gap).

Piece (string) or Piece (null) (Piece)

Base64 image of the piece to drag (transparent PNG, cropped or as a full-height strip). Send it whenever the page has one: the gap is found by matching the piece.

Responses

Request samples

Content type
application/json
{
  • "image": "iVBORw0KGgoAAAANSUhEUgAA...",
  • "piece": "iVBORw0KGgoAAAANSUhEUgAA..."
}

Response samples

Content type
application/json
{
  • "confidence": 0.82,
  • "engine": "slider",
  • "method": "piece",
  • "reliable": true,
  • "x": 186,
  • "y": 42
}

Find the turn in a rotate captcha

How far to turn: angle is degrees clockwise for the inner disc to line up with the outer ring (send both). Picture-only rotate captchas are not supported yet (model_unavailable, not charged).

Authorizations:
bearerAuthapiKeyHeader
Request Body schema: application/json
required
image
required
string (Image) [ 1 .. 7000000 ] characters

Base64 image of the inner disc (the part that turns).

Ring (string) or Ring (null) (Ring)

Base64 image of the outer ring (the picture with the disc cut out). Needed on the hosted service: without it the answer is model_unavailable (not charged).

Responses

Request samples

Content type
application/json
{
  • "image": "iVBORw0KGgoAAAANSUhEUgAA...",
  • "ring": "iVBORw0KGgoAAAANSUhEUgAA..."
}

Response samples

Content type
application/json
{
  • "angle": 137,
  • "confidence": 0.64,
  • "engine": "rotate",
  • "method": "ring",
  • "reliable": true
}

Submit a captcha (background)

Same body as /v1/solve, but returns a task id at once and solves in the background. Get the answer with GET /v1/result/{id}. A credit is reserved now (402 if there is none) and returned if the answer turns out unreliable or the task fails. Up to 256 unfinished tasks per key (429).

Authorizations:
bearerAuthapiKeyHeader
Request Body schema: application/json
required
math
boolean (Math)
Default: false

Arithmetic captcha ("14 - 10 = ?", "6 x 3", "84 ÷ 7", "3 + 4 + 5"); text is the computed answer.

hindi
boolean (Hindi)
Default: false

Operands are Hindi number words or Devanagari digits ("इकतीस + 6 = ?", "बीस - पाँच", "३१ + ६"). Requires math.

words
boolean (Words)
Default: false

Operands are English number words ("seven plus 3 = ?", "What is twenty-one minus four?"). Requires math. Beta.

script
string (Script)
Default: "latin"
Enum: "latin" "devanagari" "bengali" "assamese" "gurmukhi" "gujarati" "odia" "tamil" "telugu" "kannada" "malayalam" "cyrillic" "arabic" "urdu" "chinese"

Text captcha in another script, read as written. Indic: devanagari (Hindi, Marathi, Nepali), bengali, assamese (with ৰ and ৱ), gurmukhi (Punjabi), gujarati, odia, tamil, telugu, kannada, malayalam. Not yet enabled on the hosted service (they return model_unavailable there): cyrillic (Russian, Ukrainian, Belarusian), arabic (Arabic and Persian letters and digits), urdu (Urdu letters such as ٹ ڈ ڑ ں ے and Urdu digits; Arabic and Urdu are returned in typing order) and chinese (simplified characters; with math, prompts such as "三加五等于几"). latin (the default) is the usual A-Z / 0-9 reader. With numeric, only the script's digits. Only chinese combines with math (use hindi for Devanagari sums). Beta.

numeric
boolean (Numeric)
Default: false

The captcha may contain digits 0-9.

uppercase
boolean (Uppercase)
Default: false

The captcha may contain letters A-Z. Alone, lowercase readings are folded to uppercase.

lowercase
boolean (Lowercase)
Default: false

The captcha may contain letters a-z. Alone, uppercase readings are folded to lowercase.

symbols
boolean (Symbols)
Default: false

The captcha may also contain punctuation (@ # $ % & * + - = ? ! and similar). Latin text only.

Color (string) or Color (null) (Color)

Read only the characters drawn in this colour ("type the red characters"); everything else is ignored. Beta.

Length (integer) or Length (null) (Length)

Exact number of characters. The decoder returns the most likely reading of exactly this length. Ignored when math is set or script is not latin.

image
required
string (Image) [ 1 .. 7000000 ] characters

Base64-encoded captcha image: PNG, JPEG, GIF, WebP, TIFF, BMP or SVG, detected by content. A data:image/...;base64, prefix is accepted.

Responses

Request samples

Content type
application/json
{
  • "image": "iVBORw0KGgoAAAANSUhEUgAA...",
  • "length": 6,
  • "numeric": true
}

Response samples

Content type
application/json
{
  • "id": 0,
  • "status": "processing"
}

Get a submitted captcha's answer

processing until the captcha is solved, then ready with the same answer object /v1/solve returns. With wait, the request returns as soon as the task finishes (or after wait seconds).

Authorizations:
bearerAuthapiKeyHeader
path Parameters
task_id
required
integer <int64> (Task Id) [ 0 .. 9223372036854776000 ]

The id from /v1/submit.

query Parameters
wait
integer (Wait) [ 0 .. 30 ]
Default: 0

Seconds to hold the request while the task is processing (0 = answer now).

Responses

Request samples

# Without wait: "processing" until the answer is ready, then "ready" (or "failed").
curl -s https://captchaocr.allvoraz.com/v1/result/184467 -H "Authorization: Bearer $CAPTCHA_API_KEY"
# {"id": 184467, "status": "processing", "result": null, "error": null}

Response samples

Content type
application/json
{
  • "id": 0,
  • "status": "processing",
  • "result": {
    },
  • "error": "string"
}

account

Balance and refunds.

Credits left

Your credit balance. Every solve response also carries it in the X-Credits-Remaining header.

Authorizations:
bearerAuthapiKeyHeader

Responses

Request samples

curl -s https://captchaocr.allvoraz.com/v1/balance -H "Authorization: Bearer $CAPTCHA_API_KEY"
# {"credits": 4321}

Response samples

Content type
application/json
{
  • "credits": 0,
  • "alert_threshold": 0
}

Get your low-balance alert

Authorizations:
bearerAuthapiKeyHeader

Responses

Response samples

Content type
application/json
{
  • "threshold": 0,
  • "url": "string",
  • "payload": { },
  • "headers": {
    },
  • "armed": true,
  • "last_fired_at": "2019-08-24T14:15:22Z",
  • "last_status": 0,
  • "last_error": "string",
  • "updated_at": "2019-08-24T14:15:22Z"
}

Set your low-balance alert

One alert per account; this replaces any existing one and arms it. When a solve leaves your credits below threshold, we POST payload (JSON) to url with your headers, once, retrying for about a minute if your endpoint fails. It re-arms when you add credits above the threshold. Use POST /v1/alert/test to check delivery now.

Authorizations:
bearerAuthapiKeyHeader
Request Body schema: application/json
required
threshold
required
integer (Threshold) [ 1 .. 1000000000 ]

Call url when your credits drop below this number.

url
required
string (Url) <= 2048 characters

Your HTTPS endpoint. We POST payload to it as JSON.

Payload (object) or Payload (null) (Payload)

The JSON object to send (up to 8 KB). In string values, {{credits}}, {{threshold}} and {{time}} are replaced; a value that is exactly {{credits}} or {{threshold}} becomes a number. Default: {"event": "low_balance", "credits": N, "threshold": T}.

Headers (object) or Headers (null) (Headers)

Extra request headers, e.g. Authorization for your endpoint. Up to 10.

Responses

Request samples

Content type
application/json
{
  • "threshold": 1,
  • "url": "string",
  • "payload": { },
  • "headers": {
    }
}

Response samples

Content type
application/json
{
  • "threshold": 0,
  • "url": "string",
  • "payload": { },
  • "headers": {
    },
  • "armed": true,
  • "last_fired_at": "2019-08-24T14:15:22Z",
  • "last_status": 0,
  • "last_error": "string",
  • "updated_at": "2019-08-24T14:15:22Z"
}

Remove your low-balance alert

Authorizations:
bearerAuthapiKeyHeader

Responses

Response samples

Content type
application/json
{
  • "detail": "string",
  • "credits": 0
}

Send your alert now (test)

Sends the alert once, right now, with your current balance, and reports what your endpoint answered. Doesn't change whether the alert is armed. One test per 10 seconds.

Authorizations:
bearerAuthapiKeyHeader

Responses

Response samples

Content type
application/json
{
  • "delivered": true,
  • "status": 0,
  • "error": "string"
}

Report a wrong answer

The site rejected a reliable answer? Report its id within 48 hours and the credit comes back. Refunds per day are capped at 10% of that day's charged solves (plus 5).

Authorizations:
bearerAuthapiKeyHeader
Request Body schema: application/json
required
id
required
integer <int64> (Id)

The id of a solve from the last 48 hours.

Responses

Request samples

Content type
application/json
{
  • "id": 0
}

Response samples

Content type
application/json
{
  • "refunded": true,
  • "reason": "string",
  • "credits": 0
}

tasks

Task API: createTask / getTaskResult / getBalance / reportIncorrect (ImageToTextTask).

createTask (ImageToTextTask)

{"clientKey": KEY, "task": {"type": "ImageToTextTask", "body": BASE64, "numeric": 1, ...}}. Returns a taskId at once; the captcha is solved in the background (usually within 0.1 s). Poll getTaskResult. Low-confidence reads come back as ERROR_CAPTCHA_UNSOLVABLE and are free: get a new captcha and try again.

Request Body schema: application/json
required
property name*
additional property
any

Responses

Request samples

Content type
application/json
{ }

Response samples

Content type
application/json
{ }

getTaskResult

Request Body schema: application/json
required
property name*
additional property
any

Responses

Request samples

Content type
application/json
{ }

Response samples

Content type
application/json
{ }

getBalance (credits)

Request Body schema: application/json
required
property name*
additional property
any

Responses

Request samples

Content type
application/json
{ }

Response samples

Content type
application/json
{ }

reportIncorrect (refund)

Request Body schema: application/json
required
property name*
additional property
any

Responses

Request samples

Content type
application/json
{ }

Response samples

Content type
application/json
{ }

reportCorrect

Request Body schema: application/json
required
property name*
additional property
any

Responses

Request samples

Content type
application/json
{ }

Response samples

Content type
application/json
{ }

service

Operational endpoints.

Service health

ok when the solver and the database answer. On Lambda the scheduled warm-up call (header x-captcha-warmup) also runs the stuck-task sweep.

Responses

Request samples

curl -s https://captchaocr.allvoraz.com/health
# {"status":"ok","solver":{"status":"ok","engines":{"ocr":true,"math":true,"hindi_math":true}}}

Response samples

Content type
application/json
{
  • "status": "ok",
  • "solver": { }
}