Dedicated.Classification
Text classification
Given a text input, the model classifies it into categories.
post/dedicated/classify
Request
- Base URLhttps://api.friendli.ai
- AuthHTTP bearer
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Headers
X-Friendli-Teamstring nullable
ID of team to run requests as (optional parameter).
Request body
Example request
{
"input": "I love programming.",
"model": "(endpoint-id)"
}Response
Successfully classified the text input.
Example response
{
"data": [
{
"label": "Positive",
"num_classes": 2,
"probs": [
0.1,
0.9
]
}
],
"usage": {
"prompt_tokens": 10,
"total_tokens": 10
}
}Changes
No recorded changes to this operation across all 1 revision of this API.