API Overview
Authentication, models, billing, and endpoint conventions
API Overview
DocsRouter is an early-access document OCR API. The native /v1/ocr endpoint is the clearest expression of the current product contract; an OpenAI-style chat-completions surface is also available for compatible message-based integrations.
Base URL
https://api.docsrouter.com/v1Authentication
Authenticated endpoints require a bearer API key:
Authorization: Bearer YOUR_API_KEYCreate and revoke keys in the dashboard. Keep keys on your server and out of browser bundles, logs, and public repositories.
Core endpoints
| Method | Endpoint | Description |
|---|---|---|
POST | /v1/ocr | Extract text and optional table data from one image or document |
GET | /v1/ocr/models | List the models accepted by the native OCR endpoint |
GET | /v1/models | Read the current priced image-model catalog and pricing metadata |
GET | /v1/models/{id} | Read one supported model |
POST | /v1/chat/completions | OpenAI-style message endpoint for image and file prompts |
GET | /v1/health | Check API health |
Model selection
On /v1/ocr, pass any model returned by GET /v1/models or select quality, accuracy, speed, cost, or balanced. Explicit entries are admitted only when OpenRouter declares image input, text output, and valid pricing. Strategies are static documented mappings. They do not benchmark the input, retry low-confidence output, or run a provider waterfall.
See Models for the exact mapping.
Native OCR request
curl -X POST https://api.docsrouter.com/v1/ocr \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"url": "https://example.com/invoice.png",
"strategy": "balanced",
"options": {"extract_tables": true}
}'For supported multi-page documents, the response includes combined text and a page-by-page result array.
Billing
Vision-model requests use the upstream provider cost plus a 5% DocsRouter platform fee. Responses expose provider cost, platform fee, and total cost. Minimum charges and cent rounding can affect small requests.
Mistral OCR's dedicated parser has a direct provider rate of $2 per 1,000 pages before the platform fee.
Product boundaries
DocsRouter does not currently claim:
- a benchmark dataset, ELO ranking, or measured cross-model accuracy leaderboard
- guaranteed accuracy or latency
- result caching for duplicate documents
- automatic confidence-based fallback or retries through another model
- OCR suitability for every image-capable upstream model
Retry policy, validation, and human review remain application decisions.
Early-access expectations
Test with representative documents
Provider behavior and model output can change. Validate extraction quality, cost, and timing on your own inputs before using DocsRouter in a production or high-impact workflow.
See Native OCR for the complete current request and response schema and Errors for error handling.