The ManifestLens API lets you extract structured data from freight and logistics documents using a simple REST endpoint. You can get plain text or structured JSON output.
Base URL
https://api.manifestlens.com/v1Authenticate all API requests by including your API key in the Authorization header as a Bearer token.
curl https://api.manifestlens.com/v1/ocr \ -H "Authorization: Bearer ml_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxx"
You can create and manage API keys from your dashboard.
/api/ocrSubmit a document file and receive extracted text in your desired format.
Send a multipart/form-data request with the following fields:
| Field | Type | Required | Description |
|---|---|---|---|
| file | File | Required | The document to process (max 20MB) |
| format | string | Optional | Output format: text (default) or json |
curl -X POST https://api.manifestlens.com/v1/ocr \ -H "Authorization: Bearer ml_live_xxxxxxxxxxxx" \ -F "file=@invoice.pdf"
curl -X POST https://api.manifestlens.com/v1/ocr \ -H "Authorization: Bearer ml_live_xxxxxxxxxxxx" \ -F "file=@receipt.jpg" \ -F "format=json"
const form = new FormData()
form.append('file', fileBlob, 'document.pdf')
form.append('format', 'json')
const response = await fetch('https://api.manifestlens.com/v1/ocr', {
method: 'POST',
headers: {
Authorization: 'Bearer ' + process.env.OMNIOCR_API_KEY,
},
body: form,
})
const result = await response.json()
console.log(result.data.full_text)All successful responses return HTTP 200 with a JSON body.
{
"success": true,
"data": {
"text": "INVOICE\nDate: 2024-01-15\nAmount: $1,234.00\n..."
},
"meta": {
"fileName": "invoice.pdf",
"fileSize": 142308,
"mimeType": "application/pdf",
"format": "text",
"processingTimeMs": 847
}
}{
"success": true,
"data": {
"full_text": "INVOICE\nDate: 2024-01-15\n...",
"blocks": [
{ "type": "header", "content": "INVOICE" },
{ "type": "field", "content": "Date: 2024-01-15" },
{ "type": "field", "content": "Amount: $1,234.00" }
],
"metadata": {
"title": "Invoice",
"date": "2024-01-15",
"total": "$1,234.00"
}
},
"meta": {
"fileName": "invoice.pdf",
"fileSize": 142308,
"mimeType": "application/pdf",
"format": "json",
"processingTimeMs": 1243
}
}Errors return a non-2xx HTTP status code with a JSON error body:
{
"error": "Invalid or revoked API key"
}| Status | Meaning |
|---|---|
400 | Bad request — missing or invalid parameters |
401 | Unauthorized — missing or invalid API key |
403 | Forbidden — subscription inactive or expired |
413 | Payload too large — file exceeds 20MB limit |
415 | Unsupported media type — file format not supported |
429 | Too many requests — rate limit exceeded |
500 | Server error — OCR processing failed |