Skip to main content

Best for

Async parsing is best for large files, batch jobs, and workflows that do not need immediate responses.
  • Submit endpoint: POST /parse/async
  • Check endpoint: POST /parse/async_check

Standard flow

  1. Call POST /parse/async to submit the file and get task_id
  2. Call POST /parse/async_check every 3~5 seconds to check task status
  3. Read data.result.outputs when status becomes success

Request examples

curl -X POST https://somark.tech/api/v1/parse/async \
  -F "file=@large.pdf" \
  -F "output_formats=markdown" \
  -F "api_key=sk-your-api-key"

Polling tips

  • Keep polling interval at 3~5 seconds to avoid excessive requests
  • Add retry count and backoff for failure statuses
  • Associate task_id with business request IDs for traceability

Further reading