API Reference
Integrate Retri into your stack in under 5 minutes. Simple, powerful, and built for developers.
Authentication
Retri uses API keys to authenticate requests. Pass your key in the Authorization header.
Authorization: Bearer <YOUR_API_KEY>
Parse Endpoint
Upload a document to extract structured data.
POSThttps://api.retri.com/v1/parse
Parameters
Name
Description
file
Binary file data (PDF, JPG, PNG, WebP)
webhook_url
(Optional) URL to receive the result callback
Request Example
curl -X POST https://api.retri.com/v1/parse \
-H "Authorization: Bearer sk_live_..." \
-F "file=@invoice.pdf"Response Structure
{
"request_id": "req_123456789",
"status": "success",
"data": {
"vendor": {
"name": "Uber Technologies Inc",
"address": "1455 Market St, San Francisco, CA",
"confidence": 0.98
},
"invoice_number": "E54-213",
"date": "2024-03-15",
"currency": "USD",
"total": 24.50,
"tax": 1.50,
"line_items": [
{
"description": "Ride to Airport",
"quantity": 1,
"unit_price": 23.00,
"amount": 23.00
}
]
},
"usage": {
"credits_used": 1,
"credits_remaining": 99
}
}Ready to start building?
Get Your API Key