Skip to main content
POST
Text classification

Body

application/json

Request to classify text inputs.

inputs
required

Single text, list of texts, dict pairs or list of dicts to classify. Required.

top_k
integer
default:1

Number of top labels to return for each input.

function_to_apply
enum<string>
default:softmax

Function to apply to logits to produce probabilities or scores.

Available options:
sigmoid,
softmax,
none

Response

200 - application/json

Text classification results

label
string

Predicted label name.

score
number

Confidence score (probability-like) for the label.