{"uid":"cap_BELWrZdUWSurKfjWHul5y","slug":"x402-data-api-text-to-json-extraction-llama-3-2-3b-a26530ce","name":"x402 Data API — Text-to-JSON Extraction (Llama 3.2 3B)","description":"Text-to-JSON extraction (Llama 3.2 3B): ?text=<up to 1500 chars>&fields=<comma-separated field names> returns a strict JSON object with exactly those keys (null when absent). Use when an agent needs messy text turned into typed structured data.","url":"https://x402-data-api.sigrunner.workers.dev/ai/extract?utm_source=zero.xyz","method":"GET","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","method"],"properties":{"type":{"type":"string","const":"http"},"method":{"enum":["GET"],"type":"string"},"queryParams":{"type":"object","required":["text","fields"],"properties":{"text":{"type":"string"},"fields":{"type":"string"}}}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object","required":["data"],"properties":{"data":{"type":"object","required":["invoice_number","vendor","due_date","total"],"properties":{"total":{"type":"string"},"vendor":{"type":"string"},"due_date":{"type":"string"},"invoice_number":{"type":"string"}}}}}}}}},"responseSchema":{"type":"json","example":{"data":{"total":"1250.00","vendor":"Acme Corp","due_date":"2026-11-02","invoice_number":"4417"}}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.005","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.005/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.005","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.005","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm__P57Ae0qPvcjopNpr4Qfs","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.005","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Extracts specified fields from free-form text and returns a strict JSON object with exactly those keys (null when absent), powered by Llama 3.2 3B on Cloudflare Workers AI.","exampleAgentPrompt":"Extract the invoice_number, vendor, due_date, and total from this text: 'Please remit payment of $1,250.00 to Acme Corp by November 2nd, 2026. Invoice ref: 4417.'","exampleUseCases":[{"title":"Invoice data extraction from email","prompt":"Pull out the invoice_number, vendor, due_date, and total from this email body: 'Dear client, your invoice #INV-8821 from Bright Office Supplies for $340.00 is due on December 15, 2025. Please pay promptly.'"},{"title":"Job posting field parser","prompt":"From this job listing text, extract the job_title, company, location, and salary: 'We are hiring a Senior Data Engineer at NovaTech in Austin, TX. Compensation: $145,000/year. Apply before Jan 10.'"},{"title":"Contact info extraction from bio","prompt":"Pull the name, email, and phone from this bio snippet: 'Hi, I'm Jordan Lee, you can reach me at jordan.lee@example.com or call 555-234-9988 anytime.'"}],"resultDescription":"A JSON object with exactly the requested field names as keys; each key maps to the extracted string value from the text, or null if the field was not found. The response wraps this in a 'data' envelope, e.g. {\"data\":{\"vendor\":\"Acme Corp\",\"total\":\"1250.00\",\"due_date\":\"2026-11-02\",\"invoice_number\":\"4417\"}}.","failureModes":["Text exceeds 1500 character limit — truncation or rejection","Fields parameter missing or empty — API may return an error or empty object","Ambiguous text causes LLM to hallucinate values rather than return null","Non-English text may produce unreliable extractions given the small 3B model","Network or Cloudflare Workers outage returns 5xx","x402 payment failure or insufficient USDC balance blocks the request","Model misidentifies which text span corresponds to a requested field name"],"whenToPreferThis":"Choose this endpoint when you need to turn a short, messy, unstructured block of text (invoices, emails, bios, OCR output) into a typed JSON object with specific named fields, and you want to pay per call with no API key setup. Prefer this over larger LLM calls when the text is under 1500 chars and the task is field extraction rather than generation or reasoning. The strict null-for-absent behavior makes it reliable for downstream data pipelines.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-20T12:48:00.484Z","isFirstParty":false,"canonicalSlug":"x402-data-api-text-to-json-extraction-llama-3-2-3b-a26530ce"}