Quickstart
Request a key from the access form. Keys are prefixed sk_live_ and shown once.
# extract three fields from one invoice curl https://api.schemapipe.store/v1/extract \ -H "Authorization: Bearer $SCHEMEPIPE_KEY" \ -F "document=@invoice_2041.pdf" \ -F 'schema={"invoice_number":"string","total":"number","due_date":"date"}'
Authentication
Send the key as a bearer token. Keys are account-scoped and cannot be used from a browser; call the API from your server.
Authorization: Bearer sk_live_…
Revoke a key from the dashboard or by emailing founder@schemapipe.store. Rotation is immediate.
POST /v1/extract
Accepts multipart/form-data with a PDF and a schema, or a JSON body with a presigned S3 URL.
| Field | Type | Required | Notes |
|---|---|---|---|
document | file | yes* | PDF, up to 50 MB. *Or use document_url. |
document_url | string | no | Presigned S3 GET URL, 15-minute expiry. |
schema | object | yes | Field name → type. Max 40 fields. |
webhook_url | string | no | Deliver the result asynchronously. |
idempotency_key | string | no | Replays the same result for 24 hours. |
Schema types
| Type | Returns | Example |
|---|---|---|
string | UTF-8 text, trimmed | "Northline Logistics" |
number | JSON number, no currency symbol | 12840.00 |
date | ISO 8601 date | "2026-12-18" |
enum | One of your allowed values | {"type":"enum","values":["USD","EUR"]} |
array | List of one primitive type | {"type":"array","items":"string"} |
Nested objects are not supported in beta. Flatten line items into an array of strings, or request the line-item endpoint during onboarding.
Response
A successful call returns 200 with one object per requested field. Each field carries the value, its confidence, and the page it was read from.
{
"document_id": "doc_8f21c",
"status": "validated",
"fields": {
"invoice_number": {
"value": "INV-2041",
"confidence": 0.99,
"page": 1
},
"total": {
"value": 12840.00,
"confidence": 0.96,
"page": 2
}
},
"warnings": []
}
status is validated when every field passed its type check, or needs_review when at least one field could not be validated. A value is never invented to satisfy a schema: a missing field returns null with a warning.
Confidence
Confidence is a per-field number between 0 and 1. It reflects extraction certainty, not business correctness.
≥ 0.95— safe for automated writes.0.80–0.95— review if the field is financially material.< 0.80— route to a human before acting.
Set your own thresholds; the API does not discard low-confidence values, it flags them.
Errors
| Status | Code | Meaning |
|---|---|---|
| 400 | invalid_schema | Unknown type, or more than 40 fields. |
| 401 | unauthorized | Missing or revoked key. |
| 413 | document_too_large | Over 50 MB or 200 pages. |
| 422 | extraction_failed | Unreadable document; no fields returned. |
| 429 | rate_limited | Retry after the Retry-After header. |
| 500 | internal_error | Retried automatically twice; then returned. |
Errors return {"error": {"code": "...", "message": "...", "request_id": "..."}}. Include the request ID when contacting support.
Rate limits
Beta accounts: 60 requests per minute, 1,000 pages per day. Bursts above the limit return 429 with Retry-After in seconds. Batch endpoints are available on the usage plan.
Webhooks
Pass webhook_url and the API returns 202 immediately, then POSTs the same response body when extraction finishes. Each delivery is signed with X-Schemapipe-Signature (HMAC-SHA256 of the raw body). Failed deliveries retry at 1, 5, and 30 minutes.
Changelog
| Date | Change |
|---|---|
| 2026-11-29 | Private beta: extract endpoint, per-field confidence, page references, webhooks. |