Quickstart
Create a key in the dashboard, then call POST /v1/extract. Production hosts: https://extract.siderainc.ai (docs) and https://api.extract.siderainc.ai or https://extract.siderainc.ai/v1.
Authentication
Send Authorization: Bearer <key>. Keys are shown once. The server stores only a SHA-256 hash with a pepper, plus a visible prefix.
Request
Multipart upload, HTTPS URL, or base64 JSON. Optional type: invoice, receipt, estimate, or auto. Optional JSON Schema in schema.
curl
curl -sS https://api.extract.siderainc.ai/v1/extract \
-H "Authorization: Bearer $EXTRACT_API_KEY" \
-F type=invoice \
-F file=@./invoice.pdf
JSON URL
curl -sS https://api.extract.siderainc.ai/v1/extract \
-H "Authorization: Bearer $EXTRACT_API_KEY" \
-H "Content-Type: application/json" \
-d '{"type":"receipt","url":"https://example.com/receipt.png"}'
JavaScript
import { Extract } from "@siderainc/extract";
const client = new Extract({ apiKey: process.env.EXTRACT_API_KEY });
const result = await client.extract({ file: await Bun.file("invoice.pdf"), type: "invoice" });
Python
from sidera_extract import Extract
client = Extract(api_key=os.environ["EXTRACT_API_KEY"])
print(client.extract(path="invoice.pdf", type="invoice"))
Response
Documented schema: vendor, customer, dates, document number, currency, line items (qty / unit price / amount), subtotal, tax, total, amount paid, balance due, payment terms, notes, per-field confidence, page count. See /v1/schemas/financial-document and OpenAPI 3.1.
Models
Production extraction uses DigitalOcean Serverless Inference (https://inference.do-ai.run/v1): primary openai-gpt-5.4-nano, fallback glm-5.3-flash if the primary errors or returns invalid JSON after one retry. Override with LLM_MODEL and LLM_FALLBACK_MODEL.
Usage headers
X-Extract-Pages-Used-Month
X-Extract-Pages-Remaining-Free
X-Extract-Credits-Remaining
X-Extract-Monthly-Cap-Remaining
X-Request-Id
MCP
The repo ships an MCP server exposing extract_document for agents. Point it at this API and an API key.
Errors
401 missing/invalid key, 402 over cap or out of credits, 413 too large, 415 unsupported type, 422 validation or page cap, 429 rate limit. Support is email only: [email protected].