---
title: "OpenAI-compatible chat completions"
method: POST
path: "/v1/chat/completions"
---

# OpenAI-compatible chat completions

`POST /v1/chat/completions`

## Request

- Base URL: `https://api.proxyllm.ai`
- URL: `https://api.proxyllm.ai/v1/chat/completions`
- Auth: HTTP bearer

Same request and response shapes as OpenAI's /v1/chat/completions, including streaming. The routing key's lanes decide which provider serves.

## Request body

- object
  - `model` string, required: Model name, or a Codex tier alias (flagship, mini) on Codex-backed keys. GET /v1/models lists what this key can reach.
  - `messages` object[], required
  - `stream` boolean

## Response `200`

OpenAI-shaped completion (or SSE stream).

## Other responses

- `401`: Missing or invalid routing key.
- `402`: Routing key over its monthly budget.

---

[API](https://skmtc.dev/proxyllm/apis/proxyllm-api.md) · [All operations](https://skmtc.dev/proxyllm/apis/proxyllm-api/llms.txt) · [OpenAPI document](https://skmtc.dev/proxyllm/apis/proxyllm-api/revisions/35d93083b555?raw)
