Skip to main content
POST
/
chat
Chat with a chatbot
curl --request POST \
  --url https://www.chatbase.co/api/v1/chat \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "chatbotId": "ckl123abc456",
  "messages": [
    {
      "role": "user",
      "content": "Hello, I need help with my order"
    }
  ],
  "conversationId": "conv_abc123",
  "contactId": "user_123",
  "model": "gpt-4o-mini",
  "temperature": 0.7,
  "stream": false
}'
{
  "text": "Hello! How can I help you today?"
}

Authorizations

Authorization
string
header
required

API key in Bearer token format

Body

application/json
chatbotId
string
required

ID of the chatbot to chat with

Example:

"ckl123abc456"

messages
object[]
required

Array of messages in the conversation

conversationId
string

ID of existing conversation to continue, if not provided, the conversation will not be saved

Example:

"conv_abc123"

contactId
string

External ID of the contact/user

Example:

"user_123"

model
enum<string>

AI model to use for the response

Available options:
gpt-4-turbo,
gpt-4o,
gpt-4,
gpt-4o-mini,
gpt-4.1,
gpt-4.1-mini,
gpt-4.1-nano,
o3-mini,
o4-mini,
o3,
gpt-oss-120b,
gpt-oss-20b,
gpt-5,
gpt-5-mini,
gpt-5-nano,
claude-opus-4-1,
claude-sonnet-4,
claude-opus-4,
claude-3-7-sonnet,
claude-3-5-sonnet,
claude-3-haiku,
claude-3-opus,
gemini-1.5-flash,
gemini-1.5-pro,
gemini-2.0-flash,
gemini-2.0-pro,
gemini-2.5-flash,
grok-3,
grok-3-mini,
grok-4,
command-r,
command-r-plus,
command-a,
DeepSeek-V3,
DeepSeek-R1,
Llama-4-Scout-17B-16E-Instruct,
Llama-4-Maverick-17B-128E-Instruct-FP8,
kimi-k2
Example:

"gpt-4o-mini"

temperature
number

Temperature setting for AI response creativity

Required range: 0 <= x <= 1
Example:

0.7

stream
boolean
default:false

Whether to stream the response

Response

Chat response

text
string

The chatbot's response text

Example:

"Hello! How can I help you today?"

I