LogoLogo
  • Introduction to the Ebbot Platform
  • Ebbot Platform
  • Bot basics
    • Scenarios
    • Entities
    • Triggers
    • Training center
  • Scenarios
    • Cards and syntax
      • File Input
      • Text card
      • Input
      • Buttons
      • Image
      • File
      • Carousel
      • Location
      • List
      • Contact Agent
      • Rating request
      • Custom component
      • CoBrowsing
    • Transition
    • Card properties
  • AI Insights
    • Setup and Configuration
    • Using the Insights Dashboard
  • EbbotGPT
    • Knowledge
      • Data source transformer
      • Source types
        • File
        • Website scrape
        • Docx file
        • TOPdesk API
        • Sitevision API
        • SharePoint API
          • Create app with Sites.FullControl.All permission in Azure
          • Ebbot SharePoint Postman Guide
        • Confluence API
    • Configurations
    • Persona
    • GPT Evaluation
    • Embedder models
    • EGPT models
  • Custom vocabulary
  • Tutorials
    • Create your first scenario
      • Select a trigger
      • Add bot responses
  • Data Object
  • Release notes
  • For developers
    • Ebbot SDK
    • Safe Exchange API / Vault
    • Subdomain manager
  • EbbotGPT API
  • Chatbot & Live chat
    • Install chat widget
    • Chats API
    • Chat widget API
    • Datasource API
    • Sales tracking for live chat
    • Webhook
      • Incoming webhooks
      • Outgoing webhooks
    • SMS API
      • Authentication
      • Send SMS
      • Errors
      • Encoding
    • Python components
    • Intent detection (NLP)
  • Product guides
    • Product data feeds
    • Install guide
    • Product guide events
      • Product guide user events
      • Received events
      • Send events
    • API & webhooks
    • GA4 integration
    • Klaviyo integration
  • Messenger marketing
    • Install popup
    • API & webhooks
  • For chat agents
    • Ebbot Chat
      • Settings modal
      • Queue
      • Topbar Stats
      • Menu
        • Power-Ups!
        • Quick Replies
  • INTEGRATIONS
    • Ebbot Live Chat in Zendesk
      • Setup guide
    • Active Directory - SAML
    • Configure SAML in Azure
Powered by GitBook
On this page
  • Unlock the Power of Advanced Language Models with Ebbot GPT API
  • 1. API Key
  • 2. Tenant
  • 3. Making a Request
  • 4. Get token usage

Was this helpful?

EbbotGPT API

PreviousSubdomain managerNextChatbot & Live chat

Last updated 6 months ago

Was this helpful?

Unlock the Power of Advanced Language Models with Ebbot GPT API

Welcome to the Ebbot GPT API documentation. Our API offers seamless integration of service-optimized Large Language Models (LLMs) and Knowledge Management tools into your applications. With Ebbot GPT, you can harness sophisticated text generation capabilities and enhance your systems with cutting-edge AI technology. Explore our documentation to learn how to integrate and leverage the full potential of Ebbot GPT in your projects.

If you just want the open API documentation you can see it here:

1. API Key

2. Tenant

A tenant is required for many requests. Tenants help separate token usage and datasets between different users. Typically, you’ll only need one tenant, but multiple tenants can be used if your business case requires it. Tenants are tied to your API key, ensuring your data remains secure.

3. Making a Request

  • ExternalId: The ID you chose when creating the tenant.

  • Auth: Authentication is done with a bearer token in the authorization header. Example: "Authorization: Bearer MyAPIKey123"

3.1 List Models

To list the available models:

curl -X GET "https://egpt.ebbot.eu/v1/models" \
 -H "accept: application/json" \
 -H "authorization: Bearer API-KEY"

3.2 Create a tenant

Tenants are automatically created when a request with an unknown tenant is made. If you want to manually create a tenant then use this:

curl -X POST "https://egpt.ebbot.eu/v1/tenants/EXTERNAL-ID" \
 -H "accept: application/json"\
 -H "authorization: Bearer API-KEY" \

(Replace externalId with the id you want to add)

3.3 List tenants

To list the tenants you have created:

curl -X GET "https://egpt.ebbot.eu/v1/tenants" \
 -H "accept: application/json"\
 -H "authorization: Bearer API-KEY" \

A response could look like this:

[
"MyId1",
"MyId2",
"MyId3"
]

3.4 Creating a tenant API key

You are able to create an API key for a tenant if you wish. The tenant is able with the key to: list models, create completions and get usage. If you want to create one you can do it like this:

curl -X POST "https://egpt.ebbot.eu/v1/EXTERNAL_ID/tenant_keys/MyNewKey" \
 -H 'accept: application/json'\
 -H 'authorization: Bearer API_KEY' 

A response could look like this:

{
"apiKey": "EeQBF$9h?M_0o_%[o&JU*u[[WN~^xoAQ%]ELeCN*61SS{F!Gk&DzZgEqSgQn>d-1",
"keyName": "MyNewKey",
"concurrentRequests": 10,
"tokenAllowance": 10000
}

Make sure you save the API key as it will only be shown once!

If you want to add some rate limit rules to the key you can add these as a query parameter:

Field
Type
Description

concurrent

integer

How many requests can be made at the same time per minute.

tokenAllowance

integer

How many tokens can be used per minute.

3.5 List tenant API keys

If you want to list the API keys a tenant has you can use:

curl -X GET "https://egpt.ebbot.eu/v1/EXTERNAL_ID/tenant_keys" \
 -H 'accept: application/json'\
 -H 'authorization: Bearer API_KEY'

A response might look like this:

[
  {
    "keyName": "MyKey1",
    "created": "2024-09-24T09:39:06.547Z",
    "concurrentRequests": 10,
    "tokenAllowance": 10000
  },
  {
    "keyName": "MyKey2",
    "created": "2024-05-23T09:39:06.547Z",
    "concurrentRequests": 15,
    "tokenAllowance": 5000
  }
]

3.6 Revoke a tenant API key

To be able to revoke a tenant API key you can do it like this:

curl -X DELETE "https://egpt.ebbot.eu/v1/EXTERNAL_ID/tenant_keys/MyNewKey" \
 -H 'accept: application/json'\
 -H 'authorization: Bearer API_KEY' 

3.7 Creating a chat completion

This is where the magic happens. This is where you get a response from the bot. Here is a simple request with the bare necessities:

curl -X POST "https://egpt.ebbot.eu/v1/EXTERNAL-ID/chat/completion" \
 -H "accept: application/json"\
 -H "authorization: Bearer API-KEY"\
 -H "content-type: application/json" \
 -d '{"messages":[{"content":"You are a helpful assistant.","role":"system"},{"content":"Hello how are you?","role":"user"}]}' \

A response might look like this:

{
  "response": {
    "id": "cmpl-1c6f8437c81f417983a137b00b986bda",
    "object": "chat.completion",
    "created": 18661963,
    "model": "ebbot_gpt-1.2.3",
    "choices": [
      {
        "index": 0,
        "message": {
          "role": "assistant",
          "content": "Hello! I'm an AI, so I don't have feelings like humans do, but I'm here to assist you with any questions or tasks you might have. How can I help you today?"
        },
        "finish_reason": "stop"
      }
    ],
    "usage": {
      "prompt_tokens": 28,
      "total_tokens": 121,
      "completion_tokens": 93
    },
    "pipeline": "egpt"
  },
  "documentSlicerMetadata": {
    "cutDocuments": 0
  },
  "sources": []
}

Request parameters

The following table describes the various parameters you can use when configuring your request. These parameters control different aspects of the response generation and the overall behavior of the API. Each parameter has specific functionality, ranging from controlling randomness in responses to enabling advanced retrieval mechanisms. Understanding these parameters will help you tailor the API's output to better meet your needs and ensure that you can leverage all available features effectively.

Field
Type
Description

top_p

float

Top-p filtering selects words with the highest probability that cumulatively reach a set threshold, ensuring diverse and unpredictable text generation. (Alternative to temperature)

temperature

float

Controls the randomness of the response. Higher values make the output more random.

seed

integer

Attempts to make the answer deterministic.

maxTokens

integer

Maximum number of tokens used in the answer.

contentGuard

boolean

Flags inappropriate content by user and bot (e.g., sexual content, violence).

promptGuard

boolean

Flags if user trying is trying alter the bots behavior.

rag

object

Retrieval Augmented Generation (embedder)

rag.output

string

Placeholder for the word that will be replaced by the response from the embedder in the system prompt (e.g., {documents})

rag.dataSetId

string (UUID)

The ID of the dataset that should be used.

rag.returnSources

boolean

If the sources of the datasets should be returned.

rag.searchDefinitions

array

List of search definitions.

rag.searchDefinitions.rnrK

integer

Retrieve and rerank involves first pulling relevant information from a large dataset and then sorting it by importance or relevance. (Experimental)

rag.searchDefinitions.topK

number

Selects the top 'K' items from a list based on the highest scores or most relevance.

rag.searchDefinitions.numberOfMessages

integer

Number of messages to use from the conversation.

rag.searchDefinitions.filter

string

Filters based on specific roles (user, assistant, both).

model

string

The model to be used for the request.

messages

array

The conversation history.

messages[].content

string

The content of the message.

messages[].role

enum

Who sent the message (e.g., system, user, assistant).

When you have gotten a completion you can add the response from the bot to the array of messages and then continue the conversation with your user input. It could look like this:

...

  "messages": [
    {
      "content": "You are a helpful assistant.",
      "role": "system"
    },
    {
      "content": "Hello how are you?",
      "role": "user"
    },
    {
      "content": "Hello! I'm an AI, so I don't have feelings like humans do, but I'm here to assist you with any questions or tasks you might have. How can I help you today?",
      "role": "assistant"
    },
    {
      "content": "Okay nice! There is a problem with my tv remote. How can I get it fixed?",
      "role": "user"
    }
  ]
    
...

4. Get token usage

To get the token usage between two dates:

curl -X GET "https://egpt.ebbot.eu/v1/EXTERNAL-ID/usage?from=2024-05-01+12%3A00%3A00.000%2B00&to=2024-09-01+12%3A00%3A00.000%2B00" \
 -H "accept: application/json"\
 -H "authorization: Bearer API-KEY" 

The response might look something like this:

{
  "usage": [
    {
      "day": "2024-06-28T00:00:00.000Z",
      "sum": 2224
    },
    {
      "day": "2024-07-17T00:00:00.000Z",
      "sum": 1435
    }
  ],
  "pages": {
    "currentPage": 1,
    "totalPages": 1
  }
}

To make requests to the API, you will need an API key. To obtain one, please request access by filling out this .

form
https://egpt.ebbot.eu/v1/api_docs/