POST
/
models
/
v2
/
almanach
/
camembert-base
curl --request POST \
  --url https://api.bytez.com/models/v2/almanach/camembert-base \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '{
  "text": "Hello <mask>"
}'
{
  "output": [
    {
      "score": 0.85,
      "token": 83,
      "token_str": "world",
      "sequence": "Hello world!"
    },
    {
      "score": 0.1,
      "token": 84,
      "token_str": "there",
      "sequence": "Hello there!"
    }
  ]
}

Fill Mask

The fill-mask task uses a masked language model to predict masked tokens in a given text.

Example

Request

curl --location 'https://api.bytez.com/models/v2/almanach/camembert-base' \
--header 'Authorization: Key your-api-key-here' \
--header 'Content-Type: application/json' \
--data '{
    "text": "Hello <mask>"
}'

Authorizations

Authorization
string
header
required

Provide your API key as Key your-key-here in the Authorization header.

Body

application/json
text
string
required

Input text with a <mask> token to be predicted.

Example:

"Hello <mask>"

Response

200 - application/json
Successful response with predictions for the masked token.
output
object[]