---
title: "OpenAI Chat Completions v1 compatible endpoint"
method: POST
path: "/v1/chat/completions"
tags: ["LoRAX"]
---

# OpenAI Chat Completions v1 compatible endpoint

`POST /v1/chat/completions`

OpenAI Chat Completions v1 compatible endpoint

## Request body

- ChatCompletionRequest
  - `model` string
  - `messages` object[]
    - `role` string, required
    - `content` string, required
  - `temperature` number, float, nullable
  - `top_p` number, float, nullable
  - `n` integer, nullable
  - `max_tokens` integer
  - `stop` string[]
  - `stream` boolean
  - `adapter_source` string, nullable
  - `api_token` string, nullable

## Response `200`

Generated Text

- ChatCompletionResponse
  - `id` string
  - `object` string
  - `created` integer
  - `model` string
  - `choices` ChatCompletionResponseChoice[]
    - `index` integer
    - `message` ChatCompletionResponseMessage
      - `role` string
      - `content` string
    - `finish_reason` string, nullable
  - `usage` UsageInfo
    - `prompt_tokens` integer
    - `total_tokens` integer
    - `completion_tokens` integer, nullable

## Other responses

- `422` — Input validation error
- `424` — Generation Error
- `429` — Model is overloaded
- `500` — Incomplete generation

## Changes

- **2026-07-17** `d56749eaa5c4` — 3 warning, 4 info
  - the `n` request property's min was set to `0.00`
  - the `temperature` request property's min was set to `0.00`
  - the `top_p` request property's min was set to `0.00`
  - the `max_tokens` request property's exclusiveMinimum was decreased from `0.00` to `true`
  - …3 more
- **2024-04-29** `04ad4acad681` — 2 info
  - added the new optional request property `adapter_source`
  - added the new optional request property `api_token`
- **2024-01-19** `1e6862900f8f` — 2 warning, 1 info
  - removed the optional property `choices/items/message` from the response with the `200` status
  - removed the optional property `usage` from the response with the `200` status
  - added the optional property `choices/items/delta` to the response with the `200` status
- **2024-01-16** `365c16997999` — 1 breaking, 2 warning, 3 info
  - the `choices/items/message` response's property type changed from `string` to `object` for status `200` (media type: application/json)
  - removed the optional property `choices/items/logprobs` from the response with the `200` status (media type: text/event-stream)
  - removed the optional property `choices/items/text` from the response with the `200` status (media type: text/event-stream)
  - added the optional property `choices/items/message` to the response with the `200` status (media type: text/event-stream)
  - …2 more
- **2024-01-10** `2146c034dd75` — 1 info
  - endpoint added

[Full history](https://skmtc.dev/predibase/apis/lorax/changes/v1/chat/completions/post.md)

---

[API](https://skmtc.dev/predibase/apis/lorax.md) · [All operations](https://skmtc.dev/predibase/apis/lorax/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/predibase/lorax/revisions/d56749eaa5c4/schema)
