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

# OpenAI-compatible chat completions proxy

`POST /chat/completions`

Proxy endpoint for OpenAI chat completions API with VideoDB billing

## Request body

- object
  - `model` 'gpt-4o-2024-11-20', required
  - `messages` object[], required
    - `role` 'system' | 'user' | 'assistant'
    - `content` string
  - `max_tokens` integer
  - `temperature` number
  - `stream` boolean

## Response `200`

Chat completion response

- object
  - `id` string
  - `object` string
  - `created` integer
  - `model` string
  - `choices` object[]
    - `index` integer
    - `message` object
      - `role` string
      - `content` string
    - `finish_reason` string
  - `usage` object
    - `prompt_tokens` integer
    - `completion_tokens` integer
    - `total_tokens` integer

---

[API](https://skmtc.net/video-db/apis/videodb-server-api.md) · [All operations](https://skmtc.net/video-db/apis/videodb-server-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/video-db/videodb-server-api/versions/21b1d1d3eae8/schema)
