Custom labels at request time
No training step. Provide any set of labels and the model scores each against the input.
Classify text into custom labels at request time — no training required
You send a single `text` and a list of candidate `labels`. The service scores each label against the text using a Natural Language Inference model and returns the top label, its score, and an `all_scores` map of every label → score. No training step. Synchronous. Note: the response uses an `all_scores` object (label → score), not an array of `[label, score]` pairs. Earlier docs were wrong.
No training step. Provide any set of labels and the model scores each against the input.
For each candidate label a hypothesis is constructed and scored as entailment of the text.
Response includes the top label and a complete label→score map for the rest.
Works in any language the underlying NLI model supports — keep labels in the same language as the text for best results.
Classify support tickets into departments (billing / technical / sales) without training a custom model.
Assign custom tags to articles, reviews, or posts from an arbitrary label set.
Detect user intent (greeting, question, complaint, request) from a label list.
Input
text: string + labels: array of strings
Output
label, score, all_scores (label → score map)
Prerequisites
POST text + a labels array. The service returns the best label, its score, and the score for every candidate.
{
"text": "This new phone has amazing battery life and a great camera.",
"labels": ["technology", "food", "sports"]
}Response
{
"status": "success",
"data": {
"label": "technology",
"score": 0.7642,
"all_scores": {
"technology": 0.7642,
"sports": 0.0023,
"food": 0.0001
}
}
}Use the same language for labels as the input text. all_scores is an object (dict), not an array of pairs.
Score user-defined labels against a text via NLI. Returns top label + an all_scores map.
/v1/proxy/text-classify
Billed per request, independent of number of labels.
| Service | Unit | Price |
|---|---|---|
| Zero-Shot Classification | item | $0.006/request |
A: Sort the all_scores object by its values (descending). The top entry equals data.label.
A: The flag is accepted but the response shape is the same — apply your own threshold to all_scores.
A: Use Few-Shot Classification — it embeds your examples and computes class prototypes.
1.2 (2026-04-29)
1.1 (2026-02-23)
1.0 (2026-01-26)