Lumen API
A small HTTP API for extracting text from documents, translating it, and producing short summaries. JSON in, JSON out, one endpoint per job.
https://docs.153213.top/v1 — all requests must use TLS and carry a bearer key.Quickstart
Send a document reference and get text back. The first call after a cold start may take a few seconds while the model warms up.
curl -s https://docs.153213.top/v1/extract \
-H "Authorization: Bearer $LUMEN_KEY" \
-H "Content-Type: application/json" \
-d '{"source":{"url":"https://example.com/invoice.pdf"},"lang":"auto"}'
Response:
{
"id": "ex_8f2c1a",
"status": "ok",
"pages": 3,
"text": "Invoice #1042 ...",
"confidence": 0.97,
"usage": { "pages": 3, "credits": 3 }
}
Endpoints
| Method | Path | Purpose | Latency (p50) |
|---|---|---|---|
| POST | /v1/extract | Text + layout from PDF, DOCX, images | 0.9 s / page |
| POST | /v1/translate | Translate extracted text between 40 languages | 0.3 s / 1k chars |
| POST | /v1/summarize | Summary, key points, or a single-paragraph abstract | 0.6 s / job |
| POST | /v1/ocr | Plain-text OCR for scans and photos | 1.2 s / page |
| GET | /v1/jobs/{id} | Poll a long-running job | — |
| GET | /v1/usage | Credits consumed this month | — |
Job lifecycle
Anything under ten pages returns inline. Larger payloads switch to asynchronous mode: pass "async": true and you get a job id plus a Location header, then poll /v1/jobs/{id} until status is done or failed.
{"id":"jb_77d0e4","status":"queued","eta_seconds":14}
Pagination
List endpoints return at most 100 rows and accept ?limit=&cursor=. The response carries next_cursor; stop when it is null. Cursors are opaque — do not construct them.
Versioning
The version is part of the path. Breaking changes ship as /v2 and the previous version keeps working for twelve months. Additive fields can appear at any time; clients should ignore unknown keys.