{"uid":"cap_3kOIk1Sep-9paH6GhvXnI","slug":"text-classifier-api-ee67b3c2","name":"Text Classifier API","description":"Text classification API: classify text into your own labels with an LLM, returns the best label and a one-line reason.","url":"https://dominion-data.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":null,"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_hjOHjXc_vdSTPWce9RB_G","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 explanation.","exampleAgentPrompt":"Classify this customer message into one of these labels — 'billing', 'technical support', 'feature request', or 'general inquiry' — and give me a one-line reason for the choice: 'My invoice shows the wrong amount and I need it corrected before end of month.'","exampleUseCases":[{"title":"Customer support ticket routing","prompt":"Classify this incoming support ticket as either 'billing', 'technical', 'account', or 'other', and tell me why: 'I can't log into my account after the recent update.'"},{"title":"News article topic tagging","prompt":"Tag this news snippet with one of these topics — 'politics', 'technology', 'sports', 'health', 'finance' — and explain briefly: 'The Fed announced a 25 basis point rate hike amid ongoing inflation concerns.'"},{"title":"Product review sentiment labeling","prompt":"Classify this product review as 'positive', 'negative', or 'mixed', with a one-line reason: 'The battery life is fantastic but the screen scratches way too easily.'"}],"resultDescription":"Returns the single best-matching label from the user-provided list and a concise one-line explanation of why that label was chosen, powered by an LLM classification step.","failureModes":["Empty or missing text input returns a validation error","No labels provided results in an error or undefined output","Ambiguous text with no clearly matching label may return a low-confidence or unexpected label","Payment failure via x402 protocol blocks the request","Rate limiting or worker timeout for very long input texts"],"whenToPreferThis":"Choose this endpoint when you need lightweight, pay-per-call text classification against custom user-defined labels without standing up your own LLM pipeline. It is ideal for dynamic labeling tasks where categories change per request, and when you want a human-readable reason alongside the label. Prefer it over general-purpose LLM APIs when cost predictability ($0.005/call) and a single structured classification output are priorities.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-29T12:36:12.987Z","isFirstParty":false,"canonicalSlug":"text-classifier-api-ee67b3c2"}