Quick Start Guide

Get up and running with DocRouter in minutes. This guide walks you through the complete workflow from document upload to automation.

Overview

DocRouter transforms your document processing workflow through these key steps:

  1. Upload your first document
  2. Configure a tag, schema, and prompt
  3. Run the prompt on tagged document(s)
  4. Prompt Engineering to improve extraction quality
  5. Manual Automation using bulk actions
  6. Full Automation with REST API or Python SDK

Step 1: Upload Your First Document

Start by uploading a file and verifying it processed.

Manual Upload via Web Interface

  1. Navigate to app.docrouter.ai
  2. Click "Upload Document" or drag and drop your file
  3. Supported formats:
    PDF DOC XLS CSV TXT PNG JPG
  4. Skip tag or metadata assignment. Wait for the upload confirmation.
Upload Documents screen with drag-and-drop area and Continue button

Upload screen: drag-and-drop files, then select Continue.

Verify Processing in Document List

  1. Open the Documents list from the left sidebar.
  2. Wait until your document status becomes llm_completed.
  3. Click the document name to open and view the results.
Document list view highlighting status and document link

Documents list: wait for status llm_completed, then open the document.

Review the Document

  1. On the document page, use the viewer to page through the file.
  2. Initially, only a Document Summary is extracted.
Document viewer screen for reviewing extracted data

Document review: navigate pages and inspect extracted fields.


Step 2: Configure a Tag, Schema and Prompt

To prevent running all the prompts on all the documents, we use a tag mechanism to assign which prompts run on which documents.

Create a Tag

  1. Go to Tags in the left sidebar.
  2. Click Create Tag.
  3. Enter a descriptive tag name (e.g., invoice).
  4. Click Save tag.
Create Tag dialog showing tag name input

Create a new tag to scope which prompts run on which documents.

Create Schema (Drag & Drop)

  1. Go to Schemas in the left sidebar.
  2. Click Create Schema.
  3. Set schema name
  4. Add schema elements.
Schema elements can be of String, Integer, Float, Boolean, Object, Array type. Each element has an optional description, aiding the LLM detection. Object and Array can have embedded elements.
Create Schema screen showing drag-and-drop area

Use drag-and-drop to start a schema from a sample document.

Create Schema (JSON Editor)

  1. Open the JSON tab in the schema editor.
  2. Paste the contents of the downloaded schema file (acord_clearance_search_schema.json).
  3. Click Save Schema.
Schema JSON editor with pasted schema

Paste the JSON schema and save.


Create a Prompt

  1. Go to Prompts in the left sidebar.
  2. Create a new prompt.
  3. Paste the contents of the downloaded prompt file (acord_clearance_search_prompt.txt).
  4. Assign the schema and tag you created so it runs only on the intended documents.
  5. Select one of the language models available. Gemini 2.5 Flash and GPT 4.0 Mini are good choices for simple document layouts.
Prompt selection screen

Select or create a prompt and align it with your tag.

Step 3: Run The Prompt On The Tagged Document(s)

If a document is tagged at upload time, all prompts with that tag will be run automatically. However, if a prompt is added, updated or tagged after the document has been uploaded, the prompt will need to be manually run on the matching documents.

A separate mechanism, using file Actions, is available to run a new prompt in bulk on all matching documents that already exist.

Assign Tag to Existing Document

  1. Open the Documents list.
  2. Click the document three dots action menu, and select Edit Tags & Metadata.
  3. Add the tag linked to your prompt and save.
Tags can be assigned in bulk, and LLMs can be run in bulk using the Actions button.
Assign tag to document UI

Tag existing documents to trigger the correct prompts.

Run Prompt on Document

  1. Open the document, and switch to the Extractions tab.
  2. Click spinner to (re)run prompt.
  3. Review extraction.
  4. Refine prompt, schema then re-run on similar documents to improve quality
  5. Optionally edit result, clicking on pencil icon.
  6. Export JSON or copy values into your workflow.
Extractions results view

The Extractions tab shows structured results for your schema.


Step 4. Prompt Engineering

Iterate on prompts to improve extraction quality.

Extract the following information from this invoice:
- Invoice number
- Invoice date (format: YYYY-MM-DD)
- Vendor/supplier name
- Total amount
- All line items with descriptions, quantities, unit prices, and totals

Format the response as JSON matching the provided schema.
Be precise with numbers and dates.

Testing and Iteration

  1. Test with sample documents
  2. Review extracted data quality
  3. Refine schema and prompts
  4. Repeat until accuracy meets requirements

Step 5: Manual Automation

Leverage bulk uploads and actions for scale.

Upload pre-tagged documents at scale

  1. Setting the document tag at upload time
  2. Prompts matching the tag will run automatically.
Bulk upload with tags assigned

Upload many files at once and apply tags so prompts run automatically.

Update prompts and re-run on documents at scale

  1. Open the Documents list and filter by the tag used by your prompt.
  2. Click ActionsRun LLM.
  3. Select the updated prompt and confirm to run across all filtered documents.
  4. Monitor progress; re-run as you iterate on prompt or schema.
Bulk actions to run prompt on many documents

Use bulk Actions to apply an updated prompt to many documents at once.


Step 6: Full Automation with APIs

Automate end-to-end with REST API or Python SDK.

REST API Automation

DocRouter provides REST endpoints for automated document processing. Here are the key operations:

1. Upload Documents with Tags

# Upload documents with tags for automatic processing
curl -X POST https://api.docrouter.ai/v0/orgs/YOUR_ORG_ID/documents \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "documents": [{
      "name": "fi.pdf",
      "content": "BASE64_ENCODED_CONTENT",
      "tag_ids": ["invoice_tag_id"],
      "metadata": {"source": "api_upload"}
    }]
  }'

2. List Documents and Check Status

# List documents with filtering
curl -X GET "https://api.docrouter.ai/v0/orgs/YOUR_ORG_ID/documents?skip=0&limit=10" \
  -H "Authorization: Bearer YOUR_API_KEY"

# Get specific document details
curl -X GET https://api.docrouter.ai/v0/orgs/YOUR_ORG_ID/documents/DOCUMENT_ID \
  -H "Authorization: Bearer YOUR_API_KEY"

3. Retrieve Extraction Results

# Get LLM extraction results (wait for state: "llm_completed")
curl -X GET https://api.docrouter.ai/v0/orgs/YOUR_ORG_ID/llm/result/DOCUMENT_ID \
  -H "Authorization: Bearer YOUR_API_KEY"

# Download all results for a document
curl -X GET https://api.docrouter.ai/v0/orgs/YOUR_ORG_ID/llm/results/DOCUMENT_ID/download \
  -H "Authorization: Bearer YOUR_API_KEY"

Document Processing States:

  • uploaded: Document uploaded, OCR pending
  • ocr_processing: OCR in progress
  • ocr_completed: OCR complete, LLM processing pending
  • llm_processing: LLM extraction in progress
  • llm_completed: All processing complete, results available
  • llm_failed: Processing failed

For more details, see - REST API Documentation.

Python SDK Automation

Refer to the Python SDK Reference.


For Support: Contact our technical support team.

Ready to get started? Launch DocRouter Application or explore our REST API and Python SDK documentation.