---
title: "Create chat completion"
method: POST
path: "/v1/chat/completions"
tags: ["LLM"]
---

# Create chat completion

`POST /v1/chat/completions`

OpenAI-compatible chat completions endpoint.

## Request body

- object
  - `model` 'claude-opus-4-6' | 'claude-opus-4-7' | 'claude-opus-4-8' | 'claude-sonnet-4-6', required
  - `messages` object[], required
  - `stream` boolean
  - `max_tokens` integer
  - `temperature` number
  - `tools` object[]
  - `tool_choice` union
    - string
    - object

## Response `200`

Completion response

## Other responses

- `400` — Invalid request
- `401` — Authentication required
- `429` — Rate limit exceeded
- `500` — Provider error

---

[API](https://skmtc.net/glio/apis/glio-api.md) · [All operations](https://skmtc.net/glio/apis/glio-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/glio/glio-api/revisions/cb3d95f91e57/schema)
