Server Endpoints
/classify/zero-shot
Zero-shot classification (encoder-only NLI). Runs the NLI model against the hypothesis template for each candidate label and returns softmax scores. A single input returns a single object; a list returns an object with `results` per input.
Zero-shot classification (encoder-only NLI).
Runs the NLI model against the hypothesis template for each candidate label and
returns softmax scores. A single input returns a single object; a list returns
an object with results per input.
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
curl -X POST "https://example.com/classify/zero-shot" \ -H "Content-Type: application/json" \ -d '{ "model": "mnli", "input": "The player scored a hat-trick", "candidate_labels": [ "sports", "politics", "cooking" ] }'{ "object": "classification", "model": "string", "labels": [ "string" ], "scores": [ 0.1 ], "usage": { "prompt_tokens": 0, "total_tokens": 0 }}
RS Infer