Skip to main content

API Reference

Submit OCR jobs programmatically with your API key.

Use the StartOCR HTTP API to submit images and PDFs from your own applications.

Authentication

Create an API key from Settings in your account (sign in first). Send it as a Bearer token on every request:

Authorization: Bearer YOUR_API_KEY

Copy your key when it is created — it is shown only once. Revoke compromised keys from Settings.

Submit a job

POST https://startocr.com/api/ocr
Content-Type: application/json

Request body

FieldTypeRequiredDescription
imageBase64stringYesBase64-encoded file bytes, or a data:image/...;base64,... data URI
filenamestringNoOriginal filename (used for type detection)
provider"paddle" | "baidu"NoOCR engine. Defaults to "paddle"

Example

curl -X POST https://startocr.com/api/ocr \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "imageBase64": "data:image/png;base64,iVBORw0KGgo...",
    "filename": "scan.png",
    "provider": "paddle"
  }'

Success response

{
  "success": true,
  "taskId": "clx...",
  "provider": "paddle"
}

Save the taskId — use it to poll task status in the dashboard or via your account's task APIs.

Error responses

HTTPerror codeMeaning
401missing_api_keyNo Authorization: Bearer header
401invalid_api_keyKey is invalid or revoked
400missing_image_base64Request body missing imageBase64
400invalid_image_base64Could not decode the payload
402insufficient_pagesAccount has no remaining page balance
413payload_too_largeRequest body exceeds 10 MB
415unsupported_media_typeContent-Type must be application/json

Providers

  • paddle (default) — file is queued for async processing. Poll until the task reaches done.
  • baidu — synchronous OCR with word-level positions. Result is stored when the request completes.

Billing

Each submission deducts pages based on the document's page count before processing starts. If task creation fails after deduction, pages are refunded automatically.

CORS

Browser-based calls must originate from an allowed domain. Server-to-server integrations do not require CORS configuration.