API reference · v1 beta

Extract once, trust the shape.

One endpoint turns a PDF into JSON that matches your schema. Below is everything needed to make a first call and to know what the response guarantees.

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"}'
The beta API host is provisioned per account. The key email includes the exact base URL for yours.

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.

FieldTypeRequiredNotes
documentfileyes*PDF, up to 50 MB. *Or use document_url.
document_urlstringnoPresigned S3 GET URL, 15-minute expiry.
schemaobjectyesField name → type. Max 40 fields.
webhook_urlstringnoDeliver the result asynchronously.
idempotency_keystringnoReplays the same result for 24 hours.

Schema types

TypeReturnsExample
stringUTF-8 text, trimmed"Northline Logistics"
numberJSON number, no currency symbol12840.00
dateISO 8601 date"2026-12-18"
enumOne of your allowed values{"type":"enum","values":["USD","EUR"]}
arrayList 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

StatusCodeMeaning
400invalid_schemaUnknown type, or more than 40 fields.
401unauthorizedMissing or revoked key.
413document_too_largeOver 50 MB or 200 pages.
422extraction_failedUnreadable document; no fields returned.
429rate_limitedRetry after the Retry-After header.
500internal_errorRetried 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

DateChange
2026-11-29Private beta: extract endpoint, per-field confidence, page references, webhooks.