v1

latestOpenAPI 3.0.32026-07-26451985.7 KB

text-classification

Categorize text into predefined classes for applications like sentiment analysis, spam detection, and topic classification

post/models/v2/AdamCodd/distilbert-base-uncased-finetuned-sentiment-amazon

Request body

textstring required

The input text

Example request

{
  "text": "We are furious with the results of the experiment!"
}

Response

Successful text-classification response.

errorstring nullable required

Null on success; otherwise an error message.

Example response

{
  "output": [
    {
      "label": "negative",
      "score": 0.8025179505348206
    }
  ]
}