Build Smarter Agents with Nemotron 3 Nano Omni on FriendliAI — Explore models
curl --request POST \
--url https://api.friendli.ai/dedicated/classify \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "(endpoint-id)"
}
'{
"data": [
{
"index": 0,
"label": "Positive",
"num_classes": 2,
"probs": [
0.9,
0.1
]
}
],
"object": "list",
"usage": {
"prompt_tokens": 5,
"total_tokens": 5
}
}Classify text into categories using your Friendli Dedicated Endpoint. Send text input and receive predicted labels with per-class probabilities.
curl --request POST \
--url https://api.friendli.ai/dedicated/classify \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "(endpoint-id)"
}
'{
"data": [
{
"index": 0,
"label": "Positive",
"num_classes": 2,
"probs": [
0.9,
0.1
]
}
],
"object": "list",
"usage": {
"prompt_tokens": 5,
"total_tokens": 5
}
}Given a text input, the model classifies it into categories. To request successfully, it is mandatory to enter a Personal API Key (e.g. flp_XXX) value in the Bearer Token field. Refer to the authentication section on our introduction page to learn how to acquire this variable and visit here to generate your API Key.Documentation Index
Fetch the complete documentation index at: https://friendli.ai/docs/llms.txt
Use this file to discover all available pages before exploring further.
ID of team to run requests as (optional parameter).
ID of target endpoint. If you want to send request to specific adapter, use the format "YOUR_ENDPOINT_ID:YOUR_ADAPTER_ROUTE". Otherwise, you can just use "YOUR_ENDPOINT_ID" alone.
"(endpoint-id)"
Input text to classify, encoded as a string or array of strings. To classify multiple inputs in a single request, pass an array of strings.
Either input or tokens field is required.
"I love programming."
The tokenized prompt (i.e., input tokens).
Either input or tokens field is required.
72
Successfully classified the text input.
Hide child attributes
The index of the input in the list of inputs.
0
The predicted label for the input text.
"Positive"
The number of possible labels the model can predict.
2
A list of logits for each possible label.
[0.1, 0.9]The object type, which is always set to list.
"list"