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?"
}
{
"errors": [
"Failed to process AI Gateway request"
]
}
{
"errors": [
"The resource wasn't found"
]
}
{
"errors": [
"AI Gateway is disabled"
]
}
AI
HIPAA AI Gateway
POST
/
ai
/
ai_extensions
/
ai_gateway
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?"
}
{
"errors": [
"Failed to process AI Gateway request"
]
}
{
"errors": [
"The resource wasn't found"
]
}
{
"errors": [
"AI Gateway is disabled"
]
}
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
Create chat completion
Create chat completion
cURL
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
Analize image with URL
Analize image with URL
Accepted image types: jpeg, png.
Max image size: 50MB.
cURL
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
Analize image with Base64 encoded image
cURL
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
Messages in OpenAI format. Please refer to OpenAI documentation OpenAI messaging documentation, OpenAI analyze images documentation.
Show Message
Show Message
Headers
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?"
}
{
"errors": [
"Failed to process AI Gateway request"
]
}
{
"errors": [
"The resource wasn't found"
]
}
{
"errors": [
"AI Gateway is disabled"
]
}
Was this page helpful?