Skip to main content
POST
/
models
/
v2
/
almanach
/
camembert-base
fill-mask
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>"
}
'
{
  "error": "<string>",
  "output": [
    {
      "score": 0.85,
      "token": 83,
      "token_str": "world",
      "sequence": "Hello world!"
    },
    {
      "score": 0.1,
      "token": 84,
      "token_str": "there",
      "sequence": "Hello there!"
    }
  ]
}

Authorizations

Authorization
string
header
required

Set Authorization header to BYTEZ_KEY 'Authorization: YOUR_BYTEZ_KEY_HERE'

Body

application/json

Schema for fill-mask models

text
string
required

The input text

Example:

"Hello <mask>"

Response

Successful fill-mask response.

error
string | null
required

Null on success; otherwise an error message.

output
array
required

The generated mask predictions

Example:
[
{
"score": 0.85,
"token": 83,
"token_str": "world",
"sequence": "Hello world!"
},
{
"score": 0.1,
"token": 84,
"token_str": "there",
"sequence": "Hello there!"
}
]