# Chat API reference

> Chat completions and model discovery on the organisation's approved processing. Needs a personal key with chat:complete; an organisation integration key gets 403 integration_not_permitted.

Request and response schemas, with examples, are in the OpenAPI document: https://developers.komplai.dk/openapi.json

## GET /v1/models

**List the permitted chat models**

The models this key may use for POST /v1/chat/completions, with their context and output limits, the reasoning efforts they take and, in komplai's EU cloud, the provider's token rates. processing chooses which processing to list: komplai's local infrastructure, komplai's EU cloud or one of your organisation's own connections. It sends no text and runs no model. Needs a personal key with chat:complete.

- Operation id: `listChatModels`
- Scopes: `chat:complete`
- Parameters: `processing` (query)
- Responses: 200, 400, 401, 403, 404, 429, 503

## POST /v1/chat/completions

**Create a chat completion**

An OpenAI-compatible chat completion with text only, returned whole (stream false). It runs where processing says: komplai's local infrastructure in Denmark, komplai's EU cloud when your organisation has it approved for Chat, or one of your organisation's own connections; without processing, where your organisation's Chat runs. The API never moves a call to other processing or another model, also not when the chosen one fails. At most 32 messages and 80,000 UTF-16 code units of text; the model has 120 seconds to answer. In EU cloud, usage is metered at the provider's price and counts towards the organisation's monthly AI spending cap; the call stops when the cap, the organisation's own limit or your personal limit is reached. Needs a personal key with chat:complete.

- Operation id: `createChatCompletion`
- Scopes: `chat:complete`
- Responses: 200, 400, 401, 403, 404, 409, 413, 415, 429, 502, 503, 504

---

https://developers.komplai.dk/reference/chat
