---
title: "Create a chat completion (OpenAI-compatible)"
method: POST
path: "/openai/chat/completions"
tags: ["OpenAI Compatibility"]
---

# Create a chat completion (OpenAI-compatible)

`POST /openai/chat/completions`

## Request

- Base URL: `https://api.chatbotkit.com/api/v1`
- URL: `https://api.chatbotkit.com/api/v1/openai/chat/completions`
- Auth: HTTP bearer

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.

## Request body

- object

## Response `200`

The chat completion (or a text/event-stream when streaming)

## Other responses

- `default`: An error response

---

[API](https://skmtc.dev/chatbotkit/apis/cbk-api.md) · [All operations](https://skmtc.dev/chatbotkit/apis/cbk-api/llms.txt) · [OpenAPI document](https://skmtc.dev/chatbotkit/apis/cbk-api/revisions/13d250576136?raw)
