v1

latestOpenAPI 3.0.32026-07-26451985.7 KB

fill-mask

Predict missing words in a sentence for tasks like text completion, language modeling, and text generation

post/models/v2/almanach/camembert-base

Request body

textstring required

The input text

Example request

{
  "text": "Hello <mask>"
}

Response

Successful fill-mask response.

errorstring nullable required

Null on success; otherwise an error message.

Example response

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