v1
latestOpenAPI 3.0.32026-07-26451985.7 KBzero-shot-classification
Classify text into categories not seen during training for applications like intent detection, content moderation, and dynamic classification
post/models/v2/facebook/bart-large-mnli
Request body
Example request
{
"text": "One day I will see the world",
"candidate_labels": [
"travel",
"cooking",
"dancing"
]
}Response
Successful zero-shot-classification response.
Example response
{
"output": {
"sequence": "One day I will see the world",
"labels": [
"travel",
"dancing",
"cooking"
],
"scores": [
0.9941015839576721,
0.0031261409167200327,
0.002772255800664425
]
}
}