Documentation /docs/execution-modes

Execution Modes

Most Docspeed customer API endpoints support the same two execution patterns:

  • sync: return the full JSON payload inline
  • async: return a job_id and fetch the final payload later

Use sync when

  • A user is waiting in-product
  • The file is small or moderate
  • You want the simplest request/response path during evaluation

Use async when

  • Files are larger
  • You want durable job tracking
  • You are running background or batch workflows
  • You need retry-safe polling semantics

Example

{
  "execution_mode": "async"
}

For endpoints that support execution modes, the response contract stays aligned between sync and async. The async path simply moves the success payload behind the jobs endpoints.