{"uid":"cap_2Ip7WjfK98t9Yt2GXShyz","slug":"agent-extraction-api-text-classification-c9aec744","name":"Agent Extraction API — Text Classification","description":"Invoice-to-JSON, on-chain tools (transaction explainer + payment check, wallet profile, contract ABI, ERC-20 token risk), company contacts and web-to-RAG for AI agents. Pay per call with x402 (USDC on Base). No signup, no API key.","url":"https://freetier-agent-api.pages.dev/api/classify?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","labels"],"properties":{"text":{"type":"string","description":"text to classify"},"multi":{"type":"string","description":"true for multi-label"},"labels":{"type":"string","description":"comma-separated labels (2-20)"}}}}},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object"}}}}},"responseSchema":{"type":"json","example":{"label":"billing","labels":["billing"],"reason":"Duplicate charge and refund request.","confidence":0.95}},"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_j1YRf38VrofMnuJ5LBnCM","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":"Classifies input text into user-defined labels (2–20) with confidence scores and short reasoning, using a small Llama 3.1 8B model","exampleAgentPrompt":"Classify this customer message into one of these labels — billing, shipping, technical, or general — and tell me how confident you are: 'I was charged twice for my last order and need a refund as soon as possible.'","exampleUseCases":[{"title":"Support ticket routing automation","prompt":"Classify this incoming support ticket as billing, shipping, technical, or account using your label classifier, and tell me the confidence: 'I can't log into my account after resetting my password.'"},{"title":"Content moderation labeling","prompt":"Tag this user-submitted comment as safe, offensive, spam, or off-topic, with a reason — here's the text: 'Click here to win a free iPhone, limited offer!'"},{"title":"Product feedback categorization","prompt":"Classify this product review into bug, feature-request, compliment, or complaint: 'The checkout button disappears on mobile after adding items to cart.'"}],"resultDescription":"A JSON object containing the winning label string, a labels array (single or multiple for multi-label mode), a confidence float (0–1), and a short plain-English reason string explaining the classification decision.","failureModes":["Text exceeds 6,000 character limit — request rejected or truncated","Fewer than 2 or more than 20 labels provided — invalid request","Labels not comma-separated correctly — parsing error","Payment not attached or insufficient — x402 payment required response","Model hallucination: label returned that was not in the provided list (should not happen by design but possible with edge-case prompts)","Network timeout if Cloudflare Workers AI is slow to respond"],"whenToPreferThis":"Choose this endpoint when you need fast, cheap, zero-setup text classification against your own custom label taxonomy without fine-tuning a model. It is ideal for support ticket routing, content moderation, feedback tagging, or any scenario where you define 2–20 labels at call time and want a confidence score plus a human-readable reason. Prefer it over heavyweight NLP APIs when latency and cost matter and labels change per request.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-11-02T18:53:45.559Z","isFirstParty":false,"canonicalSlug":"agent-extraction-api-text-classification-c9aec744"}