Documents and Extractions
Documents
A document is any file you upload to Documind for processing. Supported formats include:- PDF files
- Images (JPEG, PNG, TIFF, BMP)
document_id that you use for all subsequent operations.
Extractions
An extraction is a single processing job that extracts structured data from a document using a specific schema. Each extraction:- Belongs to one document
- Uses one schema
- Can be in different states:
pending,processing,completed,failed - May require review depending on confidence scores
Schemas
A schema defines what data to extract from documents. Schemas use a JSON Schema-like format with a specialnamed_entities field for the data you want.
Basic Schema Structure
Field Types
Documind supports all standard JSON Schema types:- String
- Number
- Boolean
- Array
- Object
Required Fields
Mark critical fields asrequired to ensure they’re extracted and flagged for review if confidence is low:
Extraction Modes
Documind offers three extraction modes with different trade-offs:Basic Mode (2-6 credits/page)
Single-model extraction for simple documents:- Simple, well-formatted documents
- Cost is a priority
- Speed is important
- Review workflow not needed
- No confidence scores
- No automatic review flagging
- Single model may miss edge cases
VLM Mode (10 credits/page)
Vision Language Model-based extraction for image-heavy documents:- Scanned documents
- Images with text
- Poor quality PDFs
- Documents where layout is important
- Uses native image processing
- Better for visual documents
- No confidence scores
Advanced Mode (15 credits/page)
Multi-model ensemble with confidence scoring:- Complex documents
- High accuracy required
- Review workflow desired
- Structured forms and tables
- Multiple models consensus
- Confidence scores for every field
- Automatic review flagging
- Best accuracy
Confidence Scores
Advanced mode provides confidence scores for each extracted field, helping you understand extraction reliability.Score Calculation
Confidence scores (0-100) are calculated from:- Lexical similarity (40%): How consistent the text is across models
- Semantic similarity (60%): How similar the meaning is across models
Nested Scores
For arrays and objects, scores are nested to match the data structure:Review Workflow
When required fields have low confidence, extractions are automatically flagged for human review.Review Threshold
Thereview_threshold parameter (default: 80) determines when review is needed:
Review Flags
Theneeds_review_metadata contains flags matching your data structure:
Review States
An extraction goes through these states:Polling for Review
Poll the extractions endpoint to check review status:Credits System
Documind uses a credit-based pricing model:Credit Costs
Credit Tracking
Monitor your credits via the API:Insufficient Credits
When you run out of credits, API calls return402 Payment Required:
Authentication
All API requests require authentication using API keys passed in theX-API-Key header:
API Key Scopes
API keys can have different permission scopes:extractions:read- Read extraction resultsextractions:write- Create and update extractionsapi_keys:read- List API keysapi_keys:write- Create and manage API keysusage:read- View usage and creditsadmin- Full access (admin only)
Organization Keys
API keys can be user-specific or organization-wide, allowing team members to share access.Error Handling
Documind uses standard HTTP status codes:
See the Error Handling Guide for detailed strategies.
Next Steps
Schema Design
Learn best practices for creating effective schemas
Prompt Design
Optimize extraction prompts for better results
Invoice Tutorial
Process invoices end-to-end
API Reference
Explore all API endpoints