Extract typed fields
extractExtract typed values from messy text or receipts. Pays Fuse extract; agentpay settles the standard x402 v2 BSV 402 from this wallet. Prefer this over chat when you need structured fields with confidence scores and explicit nulls (p_null) instead of made-up answers. Types: text|number|date|time|datetime|duration|list|estimate|forecast (lists need items, e.g. "text"). fields is a name→{type} object. Tiers: S 3,500 sats (≤1,500 chars, ≤8 fields), M 15,000 (≤6,000 chars, ≤30 fields), L 50,000 (≤16,000 chars, ≤30 fields); images (base64 PNG/JPEG/WebP) are at least M. Oversized → 413, bad schema → 400. Returns answers, receipt, and txid. Pass dryRun to quote the tier and price without spending.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| key | No | Agent key (agp_…). Optional when the MCP connection sends Authorization: Bearer. | |
| ref | No | ||
| state | No | Messy text, receipt, email, or notes. Required unless images are sent. | |
| dryRun | No | Quote the extract tier (S/M/L) and price only, no debit or settlement | |
| fields | Yes | Fuse wire format: object mapping field names to {type, items?}. An array of {name, type} is also accepted. | |
| images | No | Base64 PNG, JPEG, or WebP (or data URI). Remote URLs are rejected. Image requests are at least M. | |
| approvalId | No | Approval id from a prior approval_required response | |
| amountCents | No | Override the USD cents charged (min 1 cent default) | |
| description | No | ||
| reference_date | No | YYYY-MM-DD (or ISO datetime) used to resolve relative dates like 'yesterday' |