Document Uploads
Rekognita supports a wide range of document formats. In this guide, you will learn about supported formats, size limits, and tips for the highest recognition quality.
Supported Formats
| Format | Extensions | Max Size |
|---|---|---|
.pdf | 50 MB | |
| JPEG | .jpg, .jpeg | 20 MB |
| PNG | .png | 20 MB |
| TIFF | .tif, .tiff | 50 MB |
| WebP | .webp | 20 MB |
| BMP | .bmp | 20 MB |
Basic Request
curl -X POST https://api.rekognita.com/v1/documents \
-H "Authorization: Bearer YOUR_API_KEY" \
-F "file=@document.pdf" \
-F "language=en"Multipage PDFs
Rekognita automatically processes each page of a PDF document. The result contains the text for each page separately:
{
"id": "doc_abc123",
"status": "completed",
"pages": 3,
"results": [
{ "page": 1, "text": "Page 1...", "confidence": 0.995 },
{ "page": 2, "text": "Page 2...", "confidence": 0.989 },
{ "page": 3, "text": "Page 3...", "confidence": 0.992 }
]
}Tips for Quality
- Resolution — minimum 300 DPI for scans.
- Contrast — text should clearly stand out against the background.
- Orientation — Rekognita automatically detects rotation, but correct orientation improves results.
- No Watermarks — watermarks can reduce accuracy.
Tip: For photos from a mobile phone, use the "Document" mode in the camera — this will automatically improve contrast and alignment.
Upload Error Handling
If the file does not meet the requirements, the API will return a 400 error:
{
"error": {
"code": "invalid_file",
"message": "Unsupported file format. Accepted: pdf, jpg, png, tiff, webp, bmp."
}
}Need to process many files at once? Check out the batch processing recipe.