xTrakt API Reference
The xTrakt API exposes the platform's document intelligence engine (classification, extraction, zero-shot field discovery, cropping and splitting) through a small, focused set of HTTP endpoints. It is the same engine that powers the playground inside the xTrakt platform — wrapped behind API-key authentication so you can call it from your own systems.
Base URL
The development environment is publicly available at:
https://api-dev.xtrakt.ai
All endpoints documented in this section live under this host. Every request is HTTPS-only.
Authentication
Every endpoint requires an API key issued from the xTrakt platform. The key is sent on the standard Authorization header as a Bearer token:
Authorization: Bearer xtkt_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxx
- The key always starts with the prefix
xtkt_live_. - The platform stores only a hash of the key — the plaintext value is shown to you once, at creation time. Store it in a secrets manager.
- A key can be revoked at any time from the platform. Revoked keys return
401 Unauthorized. - The key is bound to your tenant; no extra
x-tenantheader is needed.
See Getting Started for the step-by-step flow to generate a key.
Available Endpoints
All endpoints are POST and accept multipart/form-data request bodies.
| Endpoint | Purpose |
|---|---|
POST /document/classifier | Classifies one or more documents into the document types registered for your tenant. |
POST /document/extraction | Extracts the structured fields from a single document. |
POST /document/zero-shot | Discovers candidate fields from a document with no prior template. |
POST /document/crop | Returns the cropped/normalized version of a document image. |
POST /document/split | Splits a long PDF into the logical sub-documents it contains. |
Limits & file rules
- Accepted file types:
.pdf,.png,.jpg,.jpeg,.tiff,.tif,.bmp,.doc,.docx. - Maximum file size: 10 MB per file on every endpoint except
/document/split, which accepts large PDFs. - Rate limit: 50 requests per minute, per API key (HTTP
429 Too Many Requestswhen exceeded).
Response envelope
Responses are always wrapped in the standard xTrakt service envelope:
{
"data": { /* endpoint-specific payload */ },
"meta": {
"httpStatusCode": 200,
"messages": []
},
"hasErrors": false
}
When hasErrors is true, meta.messages contains human-readable error descriptions and data is null.