{"uid":"cap_wRFp-UISVRSOUeXUhtr_3","slug":"ai-text-classifier-custom-labels-confidence-7b7321bf","name":"AI Text Classifier (Custom Labels + Confidence)","description":"Text classification (sentiment analysis, topic tagging, intent detection, moderation labels...) into one of your own labels, with a confidence score, via Claude Haiku 4.5. JSON body: {text: string (max 8000 chars), labels: string[] (2 to 20 labels)}.","url":"https://x402-seller-0ay3.onrender.com/api/ai/classify","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"text":{"type":"string","description":"Text to classify (max 8000 chars)."},"labels":{"type":"array","items":{"type":"string"},"description":"List of possible labels (2 to 20)."}}},"responseSchema":{"type":"json","example":{"label":"negative","confidence":0.94}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.01","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.01/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_Rm5cnkwqgGdRAVJ34B9dB","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.01","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Classifies any text into one of your own custom labels with a confidence score, powered by Claude Haiku 4.5","exampleAgentPrompt":"Classify this customer review using the labels 'positive', 'negative', and 'neutral', and tell me how confident you are: 'The onboarding was smooth but the billing support took forever to respond.'","exampleUseCases":[{"title":"Sentiment analysis on product reviews","prompt":"I have this product review and I want you to classify it as 'positive', 'negative', or 'neutral' with a confidence score: 'Battery life is amazing but the screen scratches way too easily.'"},{"title":"Support ticket intent detection","prompt":"Classify this support message into one of these intents — 'billing_issue', 'technical_problem', 'feature_request', or 'general_inquiry' — and tell me how sure you are: 'I was charged twice this month and I can't figure out why.'"},{"title":"Content moderation label assignment","prompt":"I need you to label this user-submitted comment as either 'safe', 'offensive', or 'spam' and give me a confidence score: 'Click here to win a free iPhone, limited time only!!!'"}],"resultDescription":"A JSON object with two fields: `label` (one of the labels you provided) and `confidence` (a float between 0 and 1 indicating how certain the model is). Example: {\"label\": \"negative\", \"confidence\": 0.94}","failureModes":["Text exceeds 8000 characters — request rejected","Fewer than 2 or more than 20 labels provided — validation error","Empty text or empty label array — bad request","Service temporarily unavailable on cold start (Render.com free tier spin-up delay)","Model returns ambiguous classification when text is highly mixed or short"],"whenToPreferThis":"Choose this endpoint when you need fast, cheap, zero-setup text classification into your own arbitrary label set without training a custom model. Ideal for ad-hoc labeling tasks, dynamic label sets, or when you want LLM-quality understanding (nuance, sarcasm, context) rather than a simple keyword or regex approach. At $0.01/call it's cost-effective for moderate volumes. Prefer it over general-purpose LLM calls when you want a structured {label, confidence} response guaranteed every time.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-14T18:49:00.223Z","isFirstParty":false}