API Reference
Zero-shot text classification
POST
/
v1
/
classifications
/
zero-shot
Zero-shot text classification
curl --request POST \
--url https://api.synapsai.cloud/v1/classifications/zero-shot \
--header 'Content-Type: application/json' \
--data '
{
"sequences": "<string>",
"candidate_labels": "<string>",
"hypothesis_template": "This example is {}.",
"multi_label": false
}
'import requests
url = "https://api.synapsai.cloud/v1/classifications/zero-shot"
payload = {
"sequences": "<string>",
"candidate_labels": "<string>",
"hypothesis_template": "This example is {}.",
"multi_label": False
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"sequence": "<string>",
"labels": [
"<string>"
],
"scores": [
123
]
}Body
application/json
Zero-shot text classification request.
⌘I
Zero-shot text classification
curl --request POST \
--url https://api.synapsai.cloud/v1/classifications/zero-shot \
--header 'Content-Type: application/json' \
--data '
{
"sequences": "<string>",
"candidate_labels": "<string>",
"hypothesis_template": "This example is {}.",
"multi_label": false
}
'import requests
url = "https://api.synapsai.cloud/v1/classifications/zero-shot"
payload = {
"sequences": "<string>",
"candidate_labels": "<string>",
"hypothesis_template": "This example is {}.",
"multi_label": False
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"sequence": "<string>",
"labels": [
"<string>"
],
"scores": [
123
]
}