Model Routing
Retab provides intelligent model routing through two special model identifiers:auto-large and auto-small.
These models automatically route your requests to the current best-performing model based on availability, performance, and speed metrics. This means you don’t need to manually update your model selection when new, better-performing models become available—Retab handles the routing for you, ensuring your applications always use the optimal model for your use case.
Sync & Async Client
Retab offers both synchronous and asynchronous client interfaces, making it versatile for different application needs. The asynchronous client (AsyncRetab) is ideal for high-performance, non-blocking applications where multiple tasks run concurrently. For simpler or blocking operations, the synchronous client (Retab) provides a straightforward approach.
Here’s how you can use both:
Pagination
Many top-level resources have support for bulk fetches via list API methods. For instance, you can list extraction links, list email addresses, and list logs. These list API methods share a common structure, taking at least these four parameters: limit, order, after, and before. Retab utilizes pagination via the after and before parameters. Both parameters take an existing object ID value and return objects in either descending or ascending order by creation time.Rate Limits
Retab implements rate limiting to ensure stable service for all users. The API uses a rolling window rate limit with the following configuration:- 300 requests per 60-second window
- Applies across the following API endpoints:
POST /v1/documents/extractionsPOST /v1/documents/parse
429 Too Many Requests response. The response headers will include:
Modality
LLMs work with text and image data. Retab converts documents into different modalities, based on the document type.Native modalities
Here are the list of native modalities supported by Retab:modality parameter to specify the modality of the document and override the default modality.
Image Settings
When processing images, several factors can affect the LLM’s ability to accurately interpret and extract information. The image_resolution_dpi parameter allow you to tune images settings to improve extraction quality.API Reference
The DPI of the image. Defaults to 96.
Consensus
You can leverage the consensus feature to improve the accuracy of the extraction. The consensus feature is a way to aggregate the results of multiple LLMs to improve the accuracy of the extraction. The consensus principle is simple: Multiple runs should give the same result, if the result is not the same, the LLM is not confident about the result so neither should you. We compute a consensus score for each field. Some additional_consensus_score fields are added to the likelihoods object, they are computed as the average of the consensus scores within some context.