Here you will find basic information along with API documentation for the OCR solver.
Overview
The OCR API lets you submit images and receive extracted text back. All requests are handled asynchronously. You submit an image, receive a task_id, and poll for the result.
You will need a valid API key to use any endpoint. Contact your administrator to obtain one.
Authentication
Every request requires your API key as a query parameter:
?api=YOUR_API_KEY
Endpoints
Check Balance
GET/api/balance
Returns your remaining solve credits and usage in the last 24 hours.
Query Parameters
Parameter
Type
Required
Description
api
string
✅ Yes
Your API key
Example Request
GET /api/balance?api=YOUR_API_KEY
Example Response
Response Fields
Field
Type
Description
status
string
"ok" if the request succeeded
solves
integer
Total solve credits remaining
24h
integer
Number of solves used in the last 24 hours
Submit Image for OCR
POST/api/ocr/solve
Upload an image to be processed. Returns a task_id to use when polling for the result.
Query Parameters
Parameter
Type
Required
Description
api
string
✅ Yes
Your API key
Request Body
Field
Type
Required
Description
image
file
✅ Yes
Image file (multipart/form-data)
Common formats like PNG, JPG, and BMP are supported.
Example Request
Example Response
Response Fields
Field
Type
Description
status
string
"ok" if the task was accepted
result
string
"in_process" while OCR is running
task_id
string
Use this to retrieve your result
solves
integer
Remaining credits after this submission
One solve credit is deducted per successful OCR completion. Tasks and uploaded images are automatically deleted after 30 seconds — retrieve your result promptly.
Get OCR Result
GET/api/ocr/result/{task_id}
Poll this endpoint with the task_id from the submit step to retrieve your OCR result.
Path Parameters
Parameter
Type
Required
Description
task_id
string
✅ Yes
The task ID returned from the submit endpoint
Example Request
Example Responses
Response Fields
Field
Type
Description
status
string
"ok" for success, "fail" if something went wrong
result
string
Extracted text, "in_process", or an error message
task_id
string
The task identifier
time
float
Processing time in seconds (null if not yet complete)
solves
integer
Your remaining credits
Poll every 1–2 seconds until result is no longer "in_process". Tasks expire after 30 seconds — after that, this endpoint returns 404 Not Found.
Error Reference
HTTP Status
Detail
Meaning
401
Invalid API key
Your API key is wrong or does not exist
402
No solves remaining
You have run out of credits — contact your administrator
404
Task not found or expired
The task has expired (30s limit) or the ID is incorrect
Quick Start
Here's the typical end-to-end flow:
1
Step 1 — Check your balance
2
Step 2 — Submit your image
3
Step 3 — Poll for the result
4
Step 4 — Use the extracted text
The OCR output will be in the result field of the response.
{
"status": "ok",
"result": "Hello, this is the extracted text from the image.",
"task_id": "d290f1ee-6c54-4b01-90e6-d701748f0851",
"time": 1.23,
"solves": 949
}