Agent Extraction API
Invoice or receipt (PDF, PNG/JPEG/WebP image, or plain text) to structured JSON with a fixed schema: vendor (name, address, VAT ID, email, phone, IBAN), customer, invoice number, order number, issue/due date, currency (ISO 4217), subtotal, VAT total, total, amount due, VAT breakdown and line items. Every field has value, the verbatim source quote and a confidence score (0-1: quote found in the document, value matches quote, totals add up). Arithmetic checks included. $0.0075 per page (max 10 pages per call; the 402 quotes pages x $0.0075), 1 free call per caller (up to 3 pages). Runs on Cloudflare Workers AI only (PDF text layer via toMarkdown, OCR for images); documents are not stored. Scanned PDFs without a text layer: send page images. POST JSON {url} or {file_base64, mime_type} or {text}, or POST the raw file (Content-Type application/pdf or image/*); GET ?url= or ?text= also works.
Offering
- Provider
- freetier-agent-api.pages.dev
- Method
- POST
- Offering type
- Api Endpoint
- Transport type
- http
- Category
- Other
- Delivery
- Not provided
- Pricing model
- Not provided
- x402 version
- 2
Endpoint context
- URL
https://freetier-agent-api.pages.dev/api/invoice-json- MIME type
- application/json
- First seen
- 2026-10-27T23:34:04.303Z
- Last seen
- Tags
- invoice, receipt, document-extraction, ocr, accounting
Payment pricing
x402 payment terms are the authoritative price for calling this endpoint.
- Payment option 1
- 0.0075 USDC
Atomic price: 7500 · Network: eip155:8453 · Asset: USDC · Scheme: exact
Raw x402 terms
[
{
"scheme": "exact",
"network": "eip155:8453",
"asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
"amount": "7500",
"payTo": "0x165Eb3dC3E98403ecB1141e90400F5e71806554B"
}
]Observed health
- Status
- Healthy
- Latest latency
- 279 ms
- Average latency
- 214 ms
- HTTP status
- 200
- Last checked
- Reachability
- 100% over 12 checks
Latency is measured to the first response headers. A reachable result does not verify response accuracy or merchant identity.
Input schema
{
"properties": {
"body": {
"properties": {
"file_base64": {
"description": "POST JSON only: base64 file content",
"type": "string"
},
"mime_type": {
"description": "POST JSON only: application/pdf, image/png, image/jpeg, image/webp or text/plain",
"type": "string"
},
"text": {
"description": "invoice text instead of a file (max 40,000 chars)",
"type": "string"
},
"url": {
"description": "public http(s) URL of a PDF, PNG, JPEG or WebP invoice/receipt (max 8 MB)",
"type": "string"
}
},
"required": [],
"type": "object"
},
"bodyType": {
"enum": [
"json"
],
"type": "string"
},
"method": {
"enum": [
"POST"
],
"type": "string"
},
"type": {
"const": "http",
"type": "string"
}
},
"required": [
"type",
"method"
],
"type": "object"
}Output schema
{
"type": "object",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"required": [
"input"
],
"properties": {
"input": {
"type": "object",
"required": [
"type",
"method"
],
"properties": {
"body": {
"type": "object",
"required": [],
"properties": {
"url": {
"type": "string",
"description": "public http(s) URL of a PDF, PNG, JPEG or WebP invoice/receipt (max 8 MB)"
},
"text": {
"type": "string",
"description": "invoice text instead of a file (max 40,000 chars)"
},
"mime_type": {
"type": "string",
"description": "POST JSON only: application/pdf, image/png, image/jpeg, image/webp or text/plain"
},
"file_base64": {
"type": "string",
"description": "POST JSON only: base64 file content"
}
}
},
"type": {
"type": "string",
"const": "http"
},
"method": {
"enum": [
"POST"
],
"type": "string"
},
"bodyType": {
"enum": [
"json"
],
"type": "string"
}
}
},
"output": {
"type": "object",
"required": [
"type"
],
"properties": {
"type": {
"type": "string"
},
"example": {
"type": "object",
"properties": {
"input": {
"type": [
"string",
"null"
]
},
"model": {
"type": [
"string",
"null"
]
},
"pages": {
"type": [
"number",
"null"
]
},
"checks": {
"type": [
"object",
"string",
"number",
"null"
]
},
"limits": {
"type": [
"string",
"null"
]
},
"totals": {
"type": [
"object",
"string",
"number",
"null"
]
},
"vendor": {
"type": [
"object",
"string",
"number",
"null"
]
},
"missing": {
"type": "array"
},
"sources": {
"type": "array"
},
"currency": {
"type": [
"object",
"string",
"number",
"null"
]
},
"customer": {
"type": [
"object",
"string",
"number",
"null"
]
},
"due_date": {
"type": [
"object",
"string",
"number",
"null"
]
},
"billed_usd": {
"type": [
"number",
"null"
]
},
"issue_date": {
"type": [
"object",
"string",
"number",
"null"
]
},
"line_items": {
"type": "array"
},
"text_chars": {
"type": [
"number",
"null"
]
},
"order_number": {
"type": [
"object",
"string",
"number",
"null"
]
},
"document_type": {
"type": [
"object",
"string",
"number",
"null"
]
},
"payment_terms": {
"type": [
"object",
"string",
"number",
"null"
]
},
"vat_breakdown": {
"type": "array"
},
"invoice_number": {
"type": [
"object",
"string",
"number",
"null"
]
},
"confidence_method": {
"type": [
"string",
"null"
]
},
"overall_confidence": {
"type": [
"number",
"null"
]
}
},
"description": "Top-level fields; full schema in /openapi.json"
}
}
}
}
}