> ## Documentation Index
> Fetch the complete documentation index at: https://docs.documind.cloud/llms.txt
> Use this file to discover all available pages before exploring further.

# API Overview

> Intelligent document extraction API for automation workflows

> [!WARNING]
>
> Use `review_decision_managed` to select the workflow. False or absent preserves your existing legacy endpoints, booleans, and review behavior. True uses explicit review states, terminal cancellation, and read-only decisions. For managed documents, missing or unknown state stops processing. See the [state dispatcher](https://docs.documind.cloud/api/review/polling-pattern.md).

## What is Documind API?

Documind provides a powerful document extraction API designed for automation developers and integration engineers. Upload documents, define extraction schemas, and receive structured JSON data with confidence scores and automatic review flagging.

## Key Capabilities

> [card] Multi-Model Extraction
>
> Choose between Basic, VLM-based, or Advanced (multi-model ensemble) extraction modes with different accuracy and speed trade-offs.

> [card] Schema Flexibility
>
> Use predefined schemas, generate from samples, or create custom schemas for any document type.

> [card] Review Workflow
>
> Automatic flagging of low-confidence fields enables human-in-the-loop validation for critical data.

> [card] Credit-Based Usage
>
> Transparent per-page pricing with different credit costs for Basic (2-6), VLM (10), and Advanced (15) extraction.

## How It Works

**1. Upload Documents**

Submit PDF, Word, or image files via the `/upload` endpoint. Returns document IDs for processing.

**2. Define Schema**

Specify what data to extract using JSON Schema format. Generate schemas automatically or use predefined templates.

**3. Extract Data**

Process documents with `/extract/{document_id}`. Choose extraction mode and review threshold.

**4. Handle Reviews**

Poll `/data/extractions` to detect when `review_status=approved` for documents that needed review. Use corrected data in your automation.

## Extraction Modes

> [accordion] Basic Extraction (2-6 credits/page)
>
> Single-model extraction with your choice of:
>
> * `google-gemini-3-flash` (6 credits)
> * `google-gemini-2.5-flash` (4 credits)
> * `qwen-3-vl` (2 credits)
>
> Best for simple documents where extensive validation isn't required.

> [accordion] VLM Based Extraction (10 credits/page)
>
> Uses native visual data to process content through multiple Vision-Language Models.
>
> Best for low-text, high-visual content like scanned documents, images, or forms where layout is crucial.

> [accordion] Advanced Extraction (15 credits/page)
>
> Multi-model ensemble extraction utilizing document layout, reading order, and OCR'd text.
>
> Includes confidence scores and automatic review flagging. Best for structured documents like invoices, forms, and tables requiring high accuracy. Activated by not setting `model` or `extraction_mode` parameters.

## Use Cases

### Common Use Cases

* **Invoice Processing**: Extract line items, totals, vendor details
* **Form Data Entry**: Digitize paper forms into structured data
* **Document Classification**: Identify document types and route accordingly
* **Compliance Checks**: Extract specific fields for validation

### Integration Examples

Copy `poll_for_review` from [Polling for Reviews](https://docs.documind.cloud/api/review/polling-pattern.md) into a local `review_polling.py` module in your integration. Copy the imports and function definition only; keep the module-level usage demonstration in your caller. This is customer code, not an installed SDK. Synchronous extraction responses do not include technical `status`; the helper reads stored state.

```python theme={null}
from review_polling import poll_for_review
outcome = poll_for_review(document_id, api_key)
if outcome["outcome"] == "continue":
    process_document(outcome["results"])
elif outcome["outcome"] == "cancel":
    cancel_downstream_work_item(document_id)
elif outcome["outcome"] == "legacy_policy":
    apply_existing_legacy_policy(document_id)
else:
    alert_review_team(document_id)
```

## Authentication

All API requests require authentication using API keys passed in the `X-API-Key` header:

```bash theme={null}
X-API-Key: YOUR_API_KEY
```

> [!WARNING]
>
> Never commit API keys to version control. Use environment variables or secure credential storage.

## Rate Limits & Credits

* **API Calls**: Track usage via `/usage/current` endpoint
* **Credits**: Deducted per page/image processed
* **Daily Refresh**: Credits refresh based on your subscription tier
* **Insufficient Credits**: Returns `402 Payment Required` status

Check your current credits:

```bash theme={null}
curl https://api.documind.cloud/api/v1/usage/credits \
  -H 'X-API-Key: YOUR_API_KEY'
```

## Next Steps

> [card] [Quick Start](https://docs.documind.cloud/api/quickstart.md)
>
> Get started with your first extraction in 5 minutes

> [card] [Authentication](https://docs.documind.cloud/api/authentication.md)
>
> Learn how to create and manage API keys

> [card] [Extraction Flow](https://docs.documind.cloud/api/extraction/extraction-flow.md)
>
> Understand the complete extraction workflow

> [card] [Review Polling](https://docs.documind.cloud/api/review/polling-pattern.md)
>
> Implement review polling for automation pipelines


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.