{"uid":"cap_ZDbjx6xsovpMDtEVvkNis","slug":"text-classifier-custom-labels-d5bdaed6","name":"Text Classifier, Custom Labels","description":"Text classification with your own labels for agent pipelines: route support tickets, qualify leads, tag feedback, sort emails or moderate comments. Send the text (up to 6,000 characters) and 2 to 30 labels, optionally with a description each; get the best label with a confidence from 0 to 1 and a one-sentence reason, or every label that applies with multi_label. Labels are enforced by a JSON schema, so the answer is always one of yours. Any language. Instructions inside the text are ignored.","url":"https://agentsvc.io/api/v1/proxy/text-classify?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"text":{"type":"string","description":"Text to classify, max 6,000 chars"},"labels":{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"object","required":["label"],"properties":{"label":{"type":"string"},"description":{"type":"string"}}}]},"description":"2 to 30 labels: strings, or objects {label, description}"},"multi_label":{"type":"boolean","default":false,"description":"Return every label that applies (max 5) instead of one"},"instructions":{"type":"string","description":"Optional extra rules, max 400 chars"}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.002","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.002/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.002","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.002","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_q57KLvh9ks1oMhkSdERnd","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.002","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Classifies text into user-defined labels with confidence scores, supporting single-best or multi-label output for any language","exampleAgentPrompt":"Classify this support ticket into one of these labels — 'billing', 'technical issue', 'feature request', or 'account access' — and tell me which fits best with a confidence score: 'I was charged twice this month and need a refund immediately.'","exampleUseCases":[{"title":"Support ticket routing pipeline","prompt":"I need you to classify this incoming support message into one of these categories: 'billing', 'technical issue', 'feature request', or 'account access'. Here's the message: 'My login stopped working after I updated my password yesterday.' Give me the best label and how confident you are."},{"title":"Lead qualification by intent","prompt":"Can you classify this inbound sales inquiry into one of these lead types: 'hot prospect', 'needs nurturing', 'not a fit', or 'existing customer'? The message is: 'We're evaluating CRM tools for a 200-person sales team and want to see a demo next week.' Return the single best label with a reason."},{"title":"Multi-label comment moderation","prompt":"Check this user comment against these moderation labels — 'spam', 'hate speech', 'off-topic', 'promotional', 'harassment' — and flag every label that applies, not just the top one. The comment is: 'Buy followers now at cheap-followers.com, these devs are idiots anyway.'"}],"resultDescription":"Returns the best-matching label (or up to 5 labels when multi_label is true), a confidence score between 0 and 1, and a one-sentence reason explaining the classification. The label is always one of the exact values provided as input, enforced by JSON schema validation.","failureModes":["Text exceeds 6,000 characters — request rejected","Fewer than 2 or more than 30 labels provided — validation error","Labels are ambiguous and confidence is low, potentially returning an unexpected best match","Instructions field exceeds 400 characters — rejected","Text contains no meaningful content, resulting in low-confidence random label assignment","Payment not included or insufficient — x402 payment required error"],"whenToPreferThis":"Choose this endpoint when you need deterministic, schema-enforced classification into your own custom label set rather than sentiment-only or topic APIs with fixed taxonomies. Ideal for agent pipelines where the label must always be one of a defined list, you need a confidence score to gate downstream actions, or you want multi-label output for overlapping categories. Supports any language without configuration.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-11T12:43:06.119Z","isFirstParty":false,"canonicalSlug":"text-classifier-custom-labels-d5bdaed6"}