OERENA

Documentation · API Reference

Classify a document

OERENA Document Intelligence API reference and integration guidance.

Classify a document

POST https://api.oerena.com/v1/documents/classify classifies one PDF, JPEG, or PNG as invoice, receipt, letter, or other.

AuthenticationBearer OERENA API key
Capabilitydocument.classification
Scopedocument.classification.classify
Uploadmultipart/form-data, exactly one file
Formatsapplication/pdf, image/jpeg, image/png
Limit10 MiB

cURL

curl -X POST "https://api.oerena.com/v1/documents/classify" \
  -H "Authorization: Bearer YOUR_OERENA_API_KEY" \
  -F "file=@document.pdf"

Node.js

const form = new FormData();
form.append("file", new Blob([await readFile("document.pdf")], { type: "application/pdf" }), "document.pdf");
const response = await fetch("https://api.oerena.com/v1/documents/classify", { method: "POST", headers: { Authorization: `Bearer ${process.env.OERENA_API_KEY}` }, body: form });
console.log(await response.json());

Python

response = requests.post("https://api.oerena.com/v1/documents/classify", headers={"Authorization": f"Bearer {os.environ['OERENA_API_KEY']}"}, files={"file": ("document.pdf", open("document.pdf", "rb"), "application/pdf")}, timeout=60)
print(response.json())

Response

{
  "data": { "classification": { "type": "invoice", "confidence": 0.98 } },
  "request_id": "req_example"
}

confidence is provider-supplied and may be omitted. Every response includes a request ID. Use it for support, never include document contents or credentials.

Errors, limits, and environments

Use the same authenticated server-to-server model as OCR. Development and production use separate applications, grants, and credentials. A 403 means the active Classification grant is missing; 413 indicates an oversized upload; 415 an unsupported media type; 429 rate or quota limiting; and 5xx requests should be retried safely using the request ID.

Privacy

Documents are processed for the request and are not stored in usage telemetry. Usage records safe aggregates, status, latency, and request ID. Structured Extraction remains Coming Soon and private.

Developer ConsoleCreate applicationUsageCredentials and production access