Skip to main content

Base URL

https://somark.tech/api/v1

Authentication

All requests pass the API key via the api_key field in the request body in sk-*** format.
# multipart/form-data example
-F "api_key=sk-your-api-key"

Endpoints

Use sync parsing when you need the result in the same request, such as interactive workflows, small to medium files, or UI flows that should return immediately. Use async parsing when files are larger, documents take longer to process, or you are building batch jobs or backend pipelines. In that case, submit the async task first and then poll the result query endpoint with task_id for a more reliable workflow. You can inspect remaining quota through Usage Query.
EndpointMethodPathDescription
Sync parsingPOST/parse/syncUpload a file and receive results immediately
Async parsingPOST/parse/async + /parse/async_checkSubmit a task and poll results using task_id
Usage QueryPOST/usageCheck remaining quota and account information for the current API key
Path migration notice: All parsing endpoint paths have been changed from /extract/ to /parse/. The old paths (/extract/acc_sync, /extract/async, /extract/async_check) will be discontinued on December 31, 2026. Please migrate to the new paths before then.

Usage Limits

  • File size: maximum 200MB per file
  • Page limit: maximum 300 pages per request
  • Rate limit: Beta QPS 1 per account

Supported File Formats

pdf png jpg jpeg bmp tiff jp2 dib ppm pgm pbm gif heic heif webp xpm tga dds xbm doc docx ppt pptx xlsx xlsm xls

Recognized Document Elements

Title
Title
Text block
Text block
Figure
Figure
Figure caption
Figure caption
Table
Table
Table caption
Table caption
Equation
Equation
Header
Header
Footer
Footer
Sidebar
Sidebar
Footnote
Footnote
TOC
TOC
TOC entry
TOC entry
Choice
Choice
Code block
Code block
Blank
Blank
Reference
Reference
QR code
QR code
Stamp
Stamp
Chemical structure
Chemical structure
Chemical equation
Chemical equation

Error Codes

All endpoints return a unified code field. A non-zero value indicates an error. See the full Error Codes reference.