OpenAI Compatibilitys
Create Chat Completion
Create a chat completion (OpenAI-compatible)
post
/v1/openai/chat/completions
Description
An OpenAI Chat Completions compatible endpoint. Point any OpenAI client at this base URL and set model to a selector such as model/name=... or bot/id=.... Supports streaming and tool calling.
Authorization
ChatBotKit API Secret * Required
HTTP Authorization Scheme: bearer
Request Body * Required
Request Body Schema: application/json
import { ChatBotKit } from '@chatbotkit/sdk'
const cbk = new ChatBotKit({
secret: process.env.CHATBOTKIT_API_KEY!
})
const response = await cbk.openai.chat.completions(
{})