Skip to main content
POST
/
models
/
v2
/
AdamCodd
/
distilbert-base-uncased-finetuned-sentiment-amazon
text-classification
curl --request POST \
  --url https://api.bytez.com/models/v2/AdamCodd/distilbert-base-uncased-finetuned-sentiment-amazon \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "text": "We are furious with the results of the experiment!"
}
'
{
  "error": "<string>",
  "output": [
    {
      "label": "negative",
      "score": 0.8025179505348206
    }
  ]
}

Authorizations

Authorization
string
header
required

Set Authorization header to BYTEZ_KEY 'Authorization: YOUR_BYTEZ_KEY_HERE'

Body

application/json

Schema for text-classification models

text
string
required

The input text

Example:

"We are furious with the results of the experiment!"

Response

Successful text-classification response.

error
string | null
required

Null on success; otherwise an error message.

output
array
required

Successful response with the classification

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