API Reference
Image classification pipeline
POST
/
v1
/
classifications
/
image
Image classification pipeline
curl --request POST \
--url https://api.synapsai.cloud/v1/classifications/image \
--header 'Content-Type: application/json' \
--data '
{
"inputs": "<string>",
"function_to_apply": "softmax",
"top_k": 5,
"timeout": 123
}
'import requests
url = "https://api.synapsai.cloud/v1/classifications/image"
payload = {
"inputs": "<string>",
"function_to_apply": "softmax",
"top_k": 5,
"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
Request schema for image classification.
One or more images to classify (URL, base64, multipart binary or image object). Required.
How to convert raw logits to scores; defaults to 'softmax'.
Available options:
sigmoid, softmax, none Number of top labels to return per image.
Maximum time in seconds to wait for fetching remote images; null means no timeout.
⌘I
Image classification pipeline
curl --request POST \
--url https://api.synapsai.cloud/v1/classifications/image \
--header 'Content-Type: application/json' \
--data '
{
"inputs": "<string>",
"function_to_apply": "softmax",
"top_k": 5,
"timeout": 123
}
'import requests
url = "https://api.synapsai.cloud/v1/classifications/image"
payload = {
"inputs": "<string>",
"function_to_apply": "softmax",
"top_k": 5,
"timeout": 123
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)[
{
"label": "<string>",
"score": 123
}
]