---
title: "Chat Completions"
method: POST
path: "/openai/v1/chat/completions"
tags: ["openai"]
---

# Chat Completions

`POST /openai/v1/chat/completions`

## Request

- Base URL: `https://api.alpha-grid.ai` (the document declares no server; this is the origin it was published from)
- URL: `https://api.alpha-grid.ai/openai/v1/chat/completions`
- Auth: HTTP bearer

Proxy OpenAI chat completions to keep API key server-side

## Request body

- OpenAIChatRequest
  - `model` string
  - `messages` OpenAIMessage[], required
    - `role` string, required
    - `content` string, required
  - `temperature` number
  - `max_tokens` integer

## Response `200`

Successful Response

- unknown

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/alpha-grid/apis/alphagrid-backend-dev.md) - [All operations](https://skmtc.dev/alpha-grid/apis/alphagrid-backend-dev/llms.txt) - [OpenAPI document](https://skmtc.dev/alpha-grid/apis/alphagrid-backend-dev/revisions/13bab0bdd466?raw)
