API Reference
Fill mask predictions
POST
/
v1
/
fill-mask
Fill mask predictions
curl --request POST \
--url https://api.synapsai.cloud/v1/fill-mask \
--header 'Content-Type: application/json' \
--data '
{
"inputs": "<string>",
"targets": "<string>",
"top_k": 5
}
'import requests
url = "https://api.synapsai.cloud/v1/fill-mask"
payload = {
"inputs": "<string>",
"targets": "<string>",
"top_k": 5
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)[
{
"sequence": "<string>",
"score": 123,
"token": 123,
"token_str": "<string>"
}
]Body
application/json
Request to fill masked tokens in text.
⌘I
Fill mask predictions
curl --request POST \
--url https://api.synapsai.cloud/v1/fill-mask \
--header 'Content-Type: application/json' \
--data '
{
"inputs": "<string>",
"targets": "<string>",
"top_k": 5
}
'import requests
url = "https://api.synapsai.cloud/v1/fill-mask"
payload = {
"inputs": "<string>",
"targets": "<string>",
"top_k": 5
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)[
{
"sequence": "<string>",
"score": 123,
"token": 123,
"token_str": "<string>"
}
]