---
title: "Chat with a chatbot"
method: POST
path: "/chat"
tags: ["Chat"]
---

# Chat with a chatbot

`POST /chat`

Send a message to a chatbot and receive a response. Supports streaming responses.
Can continue existing conversations by providing a conversationId.

## Request body

- object
  - `chatbotId` string, required — ID of the chatbot to chat with
  - `messages` object[], required — Array of messages in the conversation
    - `role` 'user' | 'assistant', required — Message sender role
    - `content` string, required — Message content
  - `conversationId` string — ID of existing conversation to continue, if not provided, the conversation will not be saved
  - `contactId` string — External ID of the contact/user
  - `model` 'gpt-4o-mini' | 'gpt-oss-120b' | 'gpt-oss-20b' | 'gpt-5.2' | 'gpt-5.5' | 'gpt-5.6-terra' | 'gpt-5.6-luna' | 'gpt-5-mini' | 'gpt-5-nano' | 'claude-opus-4-8' | 'claude-opus-4-7' | 'claude-opus-4-6' | 'claude-sonnet-4-6' | 'claude-opus-4-5' | 'claude-haiku-4-5' | 'claude-sonnet-4-5' | 'gemini-2.5-pro' | 'gemini-3-flash' | 'gemini-3.1-flash-lite' | 'gemini-3.1-pro' | 'gemini-3.5-flash' | 'gemini-3.5-flash-lite' | 'gemini-3.6-flash' | 'grok-3' | 'grok-3-mini' | 'grok-4' | 'DeepSeek-V3' | 'DeepSeek-R1' | 'DeepSeek-V4-Flash' | 'Llama-4-Scout-17B-16E-Instruct' | 'Llama-4-Maverick-17B-128E-Instruct-FP8' | 'kimi-k2' | 'mistral-medium-3.5' | 'mistral-small-2603' | 'glm-5.2' | 'auto' — AI model to use for the response
  - `temperature` number — Temperature setting for AI response creativity
  - `stream` boolean — Whether to stream the response

## Response `200`

Chat response

- object
  - `text` string — The chatbot's response text

## Other responses

- `400` — Bad Request - Invalid input parameters
- `401` — Unauthorized - Invalid or missing API key
- `403` — Forbidden - Access denied or quota exceeded
- `500` — Internal Server Error

---

[API](https://skmtc.dev/chatbase/apis/chatbase-api-v1.md) · [All operations](https://skmtc.dev/chatbase/apis/chatbase-api-v1/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/chatbase/chatbase-api-v1/revisions/3a2187967746/schema)
