DocRouter Python SDK

Python client library for interacting with docrouter.ai

Overview

The DocRouter Python SDK gives programmatic access to documents, OCR, LLM analysis, schemas, prompts, and tags—so you can automate document workflows and extract structured data directly from your apps.

Quick Start

To get started with the DocRouter SDK:

  1. Install the DocRouter SDK from PyPI: pip install docrouter_sdk
  2. Get your DocRouter organization ID from the URL, e.g. https://app.docrouter.ai/orgs/<docrouter_org_id>
  3. Create an organization API token from your organization settings
  4. Initialize the client and start making API calls

Basic Usage

For a guided, runnable walkthrough, please use the Google Colab notebook linked at the top of this page. It includes end-to-end examples for authentication, listing documents and tags, running LLM analysis, and more.

SDK Modules

Documents API

Manage documents in your workspace

  • List documents with optional filtering
  • Upload new documents
  • Get document details
  • Update document properties
  • Delete documents

OCR API

Access document OCR data

  • Get OCR text from documents
  • Get OCR text for specific pages
  • Get OCR blocks with position data
  • Access document OCR metadata

LLM API

Run and manage LLM analysis

  • List available LLM models
  • Run LLM analysis on documents
  • Get LLM extraction results
  • Update and verify extraction results
  • Delete LLM results

Schemas API

Manage extraction schemas

  • Create new extraction schemas
  • List existing schemas
  • Get schema details
  • Update schemas
  • Delete schemas
  • Validate data against schemas

Prompts API

Manage extraction prompts

  • Create new prompts
  • List existing prompts
  • Get prompt details
  • Update prompts
  • Delete prompts

Tags API

Manage document tags

  • Create new tags
  • List existing tags
  • Update tags
  • Delete tags

GitHub Repository

The DocRouter Python SDK is part of the docrouter.ai open source project. You can find the source code on GitHub.

View on GitHub

© 2025 DocRouter Python SDK. Part of the docrouter.ai project.