API Reference
Visual question answering
POST
/
v1
/
question-answering
/
visual
Visual question answering
curl --request POST \
--url https://api.synapsai.cloud/v1/question-answering/visual \
--header 'Content-Type: application/json' \
--data '
{
"image": "<string>",
"question": "<string>",
"top_k": 5,
"timeout": 123
}
'import requests
url = "https://api.synapsai.cloud/v1/question-answering/visual"
payload = {
"image": "<string>",
"question": "<string>",
"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 to answer questions about images.
Image or list of images to be queried (base64, URL or binary). Required.
Question or list of questions to ask about the image(s). Required.
Number of top responses/labels to return.
Maximum time in seconds for fetching remote images or processing; null for indefinite.
⌘I
Visual question answering
curl --request POST \
--url https://api.synapsai.cloud/v1/question-answering/visual \
--header 'Content-Type: application/json' \
--data '
{
"image": "<string>",
"question": "<string>",
"top_k": 5,
"timeout": 123
}
'import requests
url = "https://api.synapsai.cloud/v1/question-answering/visual"
payload = {
"image": "<string>",
"question": "<string>",
"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
}
]