Kong GPT

Kong AI Gateway API

1.0.0OAS 3.1

API interface for a variety of LLMs through Kong’s AI Gateway

API Base URL
  • Server 1:https://shared-services.kong-sales-engineering.com/portal/kongai
  • Server 2:https://shared-services-hybrid.kong-sales-engineering.com/portal/kongai
Security
basicAuth (http)

Basic authentication is a simple authentication scheme built into the HTTP protocol.
To use it, send your HTTP requests with an Authorization header that contains the word Basic
followed by a space and a base64-encoded string username:password.

Example: Authorization: Basic ZGVtbzpwQDU1dzByZA==

Additional Information

Chat with the model

This endpoint allows you to chat with the model by sending a series of messages.

post

Headers

X-LLMstringrequired

Allowed values:openaiazurecoherebedrock

Body

application/json
messagesarray[object]required
Show Child Parameters

Response

application/json

Successful response

responsestring
post/chat

Body

{
  "messages": [
    {
      "role": "system",
      "content": "You are a scientist."
    },
    {
      "role": "user",
      "content": "What is the theory of relativity?"
    }
  ]
}
{ "messages": [ { "role": "system", "content": "You are a scientist." }, { "role": "user", "content": "What is the theory of relativity?" } ] }
 
curl --request POST \
  --url https://shared-services.kong-sales-engineering.com/portal/kongai/chat \
  --header 'Accept: application/json' \
  --header 'Content-Type: application/json' \
  --data '{
  "messages": [
    {
      "role": "system",
      "content": "You are a scientist."
    },
    {
      "role": "user",
      "content": "What is the theory of relativity?"
    }
  ]
}'
application/json
{
  "response": "response"
}

Fill in the blank

Use tuned AI prompts as a service

post

Headers

X-LLMstringrequired

Allowed values:openaiazurecohere

Body

application/json
promptstringrequired
propertiesobject

Response

application/json

Successful response

responsestring
post/chat/template

Body

{
  "prompt": "{template://historian}",
  "properties": {
    "event": "Fall of the Roman Empire"
  }
}
{ "prompt": "{template://historian}", "properties": { "event": "Fall of the Roman Empire" } }
 
curl --request POST \
  --url https://shared-services.kong-sales-engineering.com/portal/kongai/chat/template \
  --header 'Accept: application/json' \
  --header 'Content-Type: application/json' \
  --data '{
  "prompt": "{template://historian}",
  "properties": {
    "event": "Fall of the Roman Empire"
  }
}'
application/json
{
  "response": "response"
}