POST
/
ai
/
{v}
/
message
Post message
curl --request POST \
  --url https://platform.ai.gloo.com/ai/{v}/message \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "chat_id": "<string>",
  "query": "What is your name?",
  "character_limit": 123,
  "sources_limit": 123,
  "stream": true,
  "publishers": [
    "<string>"
  ]
}'
{
  "chat_id": "cb26ddd31-8cd8-4fb0-a258-6691aa43771c",
  "query_id": "q167f294a-703f-4043-9d55-e929e35b2cf3",
  "message_id": "m126384c0-def0-43ac-9d4e-c099ebf4c309",
  "timestamp": "2025-07-14T18:29:42.060759",
  "success": true,
  "message": "My name is Gloo AI Chat.",
  "model": "us.meta.llama3-3-70b-instruct-v1:0",
  "sources": [],
  "sources_limit": 0,
  "suggestions": [
    "How can I use AI?",
    "What can KALLM help me with?",
    "Can I ask you for advice?"
  ],
  "intent": 0
}
By providing chat_id a new message will be added to the chat session. If no chat_id is provided, a new chat session will be created. Default behavior:
  • Gloo AI will perform a sentiment analysis on your prompt.
  • Gloo AI will provide suggestion follow ups
  • Depending on your prompt, Gloo AI will return sources that have influenced the response from our trusted partners.
You can choose to override the defaults with the query params: intent, enable_sources, enable_suggestions. Example 1: You want a rich answer that is based on trusted sources and provides you follow up suggestions. Omit all query params. Example 2: You know that your prompt is going to require trusted sources as a part of the answer. You also want to not have follow up suggestions. intent: 1, enable_suggestions: 0 Example 3: You know that your prompt is not going to require trusted sources. You also want to not have follow up suggestions. intent: 0, enable_suggestions: 0

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

v
enum<string>
required
Available options:
v1

Query Parameters

chat_id
string | null
default:""
intent
enum<integer> | null
Available options:
0,
1
enable_sources
enum<integer> | null
default:1
Available options:
0,
1,
2
enable_suggestions
enum<integer> | null
default:1
Available options:
0,
1

Body

application/json

Response

200
application/json

Successful response

The response is of type object.