---
title: "Create an OpenAI-compatible chat completion"
method: POST
path: "/bee/chat/completions"
---

# Create an OpenAI-compatible chat completion

`POST /bee/chat/completions`

## Request

- Base URL: `https://api.bee.heossi.com`
- URL: `https://api.bee.heossi.com/bee/chat/completions`
- Auth: HTTP bearer

## Request body

- object
  - `model` string, required
  - `messages` object[], required
    - `role` 'system' | 'user' | 'assistant' | 'tool', required
    - `content` string, required
  - `stream` boolean
  - `max_tokens` integer
  - `temperature` number
  - `reasoning_effort` 'low' | 'medium' | 'high' | 'xhigh' | 'max' | 'ultracode'

## Response `200`

Completion or server-sent event stream.

- ChatCompletionResponse
  - `id` string, required
  - `object` 'chat.completion', required
  - `created` integer, required
  - `model` string, required
  - `choices` object[], required
  - `usage` object, required

## Other responses

- `401`: Missing or invalid API credential
- `402`: Insufficient funded usage credit
- `403`: The requested model or capability is not included
- `429`: Allowance or rate limit reached

---

[API](https://skmtc.dev/heossi/apis/bee-quantum-intelligence-developer-api.md) · [All operations](https://skmtc.dev/heossi/apis/bee-quantum-intelligence-developer-api/llms.txt) · [OpenAPI document](https://skmtc.dev/heossi/apis/bee-quantum-intelligence-developer-api/revisions/285f9cfc359b?raw)
