Skip to main content
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?"
}

Documentation Index

Fetch the complete documentation index at: https://docs.quickblox.com/llms.txt

Use this file to discover all available pages before exploring further.

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
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
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
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

smart_chat_assistant_id
string
required
Smart Chat Assistant ID.
messages
array
Messages in OpenAI format. Please refer to OpenAI documentation OpenAI messaging documentation, OpenAI analyze images documentation.

Headers

QB-Token
string
required
A user or application session token. See Authentication page to learn more about session tokens.

Responses

A successful response
answer
string
An error response
errors
array of strings
An error response
errors
array of strings
An error response
errors
array of strings
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?"
}