{"uid":"cap_ss0KYhCcOQknzdLt0yxQk","slug":"text-classifier-api-abe80b67","name":"Text Classifier API","description":"Exact EVM address, calldata, Uniswap V2/V3 and impermanent-loss math. Pay per call in USDC on Base via x402.","url":"https://golf-evm-math.x402-evm-math.workers.dev/ai/classify?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","method","bodyType","body"],"properties":{"body":{"properties":{}},"type":{"type":"string","const":"http"},"method":{"enum":["POST"],"type":"string"},"bodyType":{"enum":["json","form-data","text"],"type":"string"}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object"}}}}},"responseSchema":{"type":"json","example":{"label":"trade","reason":"Describes a token swap."}},"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_ydqzQzcR4EtFvXav-lfyj","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 arbitrary text into user-defined labels using an LLM, returning the best matching label and a one-line reason.","exampleAgentPrompt":"Classify this sentence into one of my labels — 'bullish', 'bearish', or 'neutral' — and give me a one-line reason: 'The Fed signaled three rate cuts ahead, sending equities soaring.'","exampleUseCases":[{"title":"Route customer support tickets","prompt":"I have a new support message that says 'my payment failed and I can't access my account' — classify it as either 'billing', 'access', or 'bug' and tell me why you picked that label."},{"title":"Tag financial news for trading bot","prompt":"Classify this headline as 'trade', 'macro', 'regulatory', or 'noise' and give me a one-liner on why: 'SEC charges crypto exchange with unregistered securities offering.'"},{"title":"Detect user intent in chatbot","prompt":"Take this user message — 'I want to cancel my subscription and get a refund' — and classify it as one of these intents: 'cancellation', 'refund', 'complaint', or 'inquiry', with a brief reason."}],"resultDescription":"A JSON object containing 'label' (the best matching label from those provided) and 'reason' (a one-sentence explanation for why that label was chosen), e.g. {\"label\":\"trade\",\"reason\":\"Describes a token swap.\"}","failureModes":["Missing required 'input' field returns a validation error","Invalid bodyType enum value causes request rejection","Overly vague or contradictory labels may result in low-confidence or unexpected label selection","Very long input text may be truncated or cause latency spikes","Network timeout on the Cloudflare worker if inference is slow","Payment failure or insufficient USDC balance blocks the request via x402 protocol"],"whenToPreferThis":"Choose this endpoint when you need lightweight, fast LLM-powered text classification with fully custom labels and a human-readable reason — ideal for routing, tagging, or intent detection pipelines where you define the taxonomy. It is simpler and cheaper than running a full chat completion when all you need is a single label + justification. Prefer this over generic LLM APIs when you want a structured JSON response with a guaranteed label field rather than freeform text.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-28T06:41:55.414Z","isFirstParty":false,"canonicalSlug":"text-classifier-api-abe80b67"}