Before call make sure that HIPAA AI Gateway feature enabled on QuickBlox Dashboard,
otherwise you will get 405 error. To obtain HIPAA AI Gateway feature please contact us by enterprise@quickblox.com .
Accepted image types: jpeg, png.
Max image size: 50MB.
Recipes
curl -X POST \
-H "Content-Type: application/json" \
-H "QB-Token: eddf864695d72d33b959eec2ae6c640d817dfada" \
-d '{
"smart_chat_assistant_id": "65d5f3473d5d68095462165d",
"messages": [
{
"role": "developer",
"content": "You are helpful assistant"
},
{
"role": "user",
"content": "Hi"
}
]
}' \
https://api.quickblox.com/ai/ai_extensions/ai_gateway
Accepted image types: jpeg, png.
Max image size: 50MB.
curl -X POST \
-H "Content-Type: application/json" \
-H "QB-Token: eddf864695d72d33b959eec2ae6c640d817dfada" \
-d '{
"smart_chat_assistant_id": "65d5f3473d5d68095462165d",
"messages": [
{
"role": "developer",
"content": "You are helpful assistant"
},
{
"role": "user",
"content": [
{
"type": "text",
"text": "What's in this image?"
},
{
"type": "image_url",
"image_url": {
"url": "https://some_website/image.jpg"
}
}
]
}
]
}' \
https://api.quickblox.com/ai/ai_extensions/ai_gateway
Analize image with Base64 encoded image
curl -X POST \
-H "Content-Type: application/json" \
-H "QB-Token: eddf864695d72d33b959eec2ae6c640d817dfada" \
-d '{
"smart_chat_assistant_id": "65d5f3473d5d68095462165d",
"messages": [
{
"role": "developer",
"content": "You are helpful assistant"
},
{
"role": "user",
"content": [
{
"type": "text",
"text": "What's in this image?"
},
{
"type": "image_url",
"image_url": {
"url": "data:image/jpeg ; base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wCEAAYGBgYHBgcICAcKCwoLCg8ODAwODxYQERAREBYiFRkVFRkVIh4kHhweJB42KiYmKjY… "
}
}
]
}
]
}' \
https://api.quickblox.com/ai/ai_extensions/ai_gateway
Body Parameters
A user or application session token. See Authentication
page to learn more about session tokens.
Responses
curl -X POST \
-H "Content-Type: application/json" \
-H "QB-Token: eddf864695d72d33b959eec2ae6c640d817dfada" \
-d '{
"smart_chat_assistant_id": "65d5f3473d5d68095462165d",
"messages": [
{
"role": "developer",
"content": "You are helpful assistant"
},
{
"role": "user",
"content": "Hi"
}
]
}' \
https://api.quickblox.com/ai/ai_extensions/ai_gateway
{
"answer" : "Hello! How can I assist you today?"
}