OCR Router

Getting Started

Start extracting text from documents in minutes

Getting Started

Follow this guide to set up your DocsRouter account and make your first API request.

1. Create an Account

Visit the DocsRouter Dashboard to create your account. You can sign up with your email or use social login providers.

2. Generate an API Key

Once logged in, navigate to the API Keys section in the dashboard sidebar.

  1. Click Create New Key.
  2. Give your key a name (e.g., "Development", "Production").
  3. Click Create.
  4. Copy your API Key immediately. For security reasons, you won't be able to see it again.

3. Add Credits

DocsRouter uses a prepaid credit system. To use paid models or process large volumes:

  1. Go to the Settings or Billing page.
  2. Click Add Credits.
  3. Choose an amount and complete the payment via Stripe.
  4. Your balance will update immediately.

Free Tier

New accounts may come with a small starting balance to test the API. Check your dashboard for details.

4. Make Your First Request

You can now use your API key to extract text from a document. Here is a simple example using curl:

curl -X POST https://api.docsrouter.com/v1/ocr \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://raw.githubusercontent.com/misbahsy/docs-router/main/assets/receipt-example.jpg",
    "model": "google/gemini-2.0-flash-001"
  }'

Returns:

{
  "id": "req_123abca...",
  "object": "ocr.result",
  "created": 1716300000,
  "model": "google/gemini-2.0-flash-001",
  "result": {
    "text": "RECEIPT\nTotal: $25.00",
    "confidence": 98,
    "language": "en"
  },
  "usage": {
    "pages_processed": 1,
    "total_cost_cents": 1,
    "processing_time_ms": 1250
  }
}

Next Steps

On this page