API Reference
Zero-shot image classification
POST
/
v1
/
classifications
/
zero-shot
/
image
Zero-shot image classification
curl --request POST \
--url https://api.synapsai.cloud/v1/classifications/zero-shot/image \
--header 'Content-Type: application/json' \
--data '
{
"image": "<string>",
"candidate_labels": [
"<string>"
],
"hypothesis_template": "This is a photo of {}",
"timeout": 123
}
'import requests
url = "https://api.synapsai.cloud/v1/classifications/zero-shot/image"
payload = {
"image": "<string>",
"candidate_labels": ["<string>"],
"hypothesis_template": "This is a photo of {}",
"timeout": 123
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)[
{
"label": "<string>",
"score": 123
}
]Body
application/json
Zero-shot classification for images using a set of candidate labels.
⌘I
Zero-shot image classification
curl --request POST \
--url https://api.synapsai.cloud/v1/classifications/zero-shot/image \
--header 'Content-Type: application/json' \
--data '
{
"image": "<string>",
"candidate_labels": [
"<string>"
],
"hypothesis_template": "This is a photo of {}",
"timeout": 123
}
'import requests
url = "https://api.synapsai.cloud/v1/classifications/zero-shot/image"
payload = {
"image": "<string>",
"candidate_labels": ["<string>"],
"hypothesis_template": "This is a photo of {}",
"timeout": 123
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)[
{
"label": "<string>",
"score": 123
}
]