Skip to main content

Error handling

HTTP error codes

Error response format

All errors follow this consistent structure:

Error fields


Retry strategy

When to retry?

Yes, retry:
  • 5xx errors (500, 502, 503, 504)
  • 429 error (Too Many Requests)
  • Network/timeout errors
Don’t retry:
  • 4xx errors except 429 (client errors)
  • 401 error (invalid token)
  • 422 error (invalid schema)

Exponential backoff

Implementation


Tracking and auditing

Using run_id for debugging

Every response includes a unique run_id that you should store for tracking and debugging:

Deduplication by content hash

To avoid processing the same note multiple times, use content hashing:

Optional tracking headers

Use the doctor and patient headers to enhance audit trails:

Next steps

Quick start

Your first call

Request Structure

Complete field reference

Examples

Real use cases

OpenAPI Reference

Complete specification