CRBNai API
  1. Chats
CRBNai API
  • README
  • Authentication
  • Guides
    • Creating a Knowledge Bot
  • API Keys
    • Get all API Keys
      GET
    • Create API Key
      POST
    • Delete API Key
      DELETE
  • Chats
    • Messages
      • Get Chat Messages
      • Post Chat Message
    • Recipes
      • Get All Chat Recipes
    • Get All Chats
      GET
    • Create Chat
      POST
  • Documents
    • Delete Document
      DELETE
    • Download Document
      GET
    • Update Document
      PUT
  • Knowledge Bots
    • Documents
      • Add Document to Knowledge Bot
      • Prepare Document Upload
    • Chats
      • Chat Messages
        • Get Messages of a Knowledge Bot chat
        • Post a message to a Knowlege Bot chat
      • Get all Knowledge Bot chats
      • Create Knowledge Bot chat
    • Chats - deprecated
      • Chat with a Knowledge Bot
    • Create Knowledge Bot
      POST
    • Get All Knowledge Bots
      GET
    • Get Knowledge Bot by ID
      GET
    • Delete Knowledge Bot by ID
      DELETE
    • Update Knowledge Bot by ID
      PUT
  1. Chats

Create Chat

POST
/api/chats
chat
Create a new Chat for the current user.
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://app.crbnai.com/api/chats' \
--header 'Content-Type: application/json' \
--data-raw '{
    "content": "Tell me something about Manhattan",
    "system_prompt": "Your name is Tom and you are an expert about the history of New York."
}'
Response Response Example
{
  "title": "cupiditate",
  "owner_id": "e490bf0f-f308-4ab8-9faf-1870af66e34f",
  "created_at": "2048-11-13T14:49:50.362Z",
  "system_prompt": "Hic neque modi.",
  "last_message_at": "2088-12-06T18:57:02.588Z",
  "id": "74b53dbd-c6bd-45cd-9b9e-94aae856d9bc",
  "recipe_id": "b0b59f52-b385-4312-9e01-02f18ff4c472"
}

Request

Authorization
Provide your bearer token in the
Authorization
header when making requests to protected resources.
Example:
Authorization: Bearer ********************
Body Params application/json
content
string 
required
Content of the first message, used for generating a title.
recipe_id
string 
optional
Optional id of a recipe that should be used as a template for creating a new chat.
llm_config
string 
optional
Optional configuration for the LLM.
system_prompt
string 
optional
Optional system prompt that should be used for this chat.
Examples

Responses

🟢200OK
application/json
Body
id
string <uuid>
optional
UUID of the chat thread.
created_at
string <date-time>
optional
Date (ISO 8601) that this chat thread was created at.
last_message_at
string <date-time>
optional
Date (ISO 8601) that this chat thread was created at.
title
string 
required
Title assigned to this chat thread. This is typically auto-generated by the LLM.
owner_id
string <uuid>
required
Auth0 ID for Owner of this Chat.
recipe_id
string <uuid> | null 
optional
UUID of the recipe used to create this thread (if applicable).
llm_config
object (LanguageModelConfig) 
required
Information and configuration of the language model.
model
string 
required
The name of the used language model
vendor
string 
required
Vendor of the used language model
Previous
Get All Chats
Next
Delete Document
Built with