---
title: "POST /openai/v1/chat/completions"
method: POST
path: "/openai/v1/chat/completions"
---

# POST /openai/v1/chat/completions

`POST /openai/v1/chat/completions`

## Request body

- object
  - `messages` union[]
    - union
      - object
        - `role` string
        - `content` string — The contents of the assistant message.
        - `name` string — An optional name for the participant. Provides the model information to differentiate between participants of the same role.
        - `refusal` string — The refusal message by the assistant.
      - object
        - `role` string
        - `content` string — The contents of the developer message.
        - `name` string — An optional name for the participant. Provides the model information to differentiate between participants of the same role.
      - object
        - `role` string
        - `content` string — The contents of the system message.
        - `name` string — An optional name for the participant. Provides the model information to differentiate between participants of the same role.
      - object
        - `role` string
        - `content` string — The contents of the assistant message.
        - `tool_call_id` string — Tool call that this message is responding to.
      - object
        - `role` string
        - `content` string — The contents of the user message.
        - `name` string — An optional name for the participant. Provides the model information to differentiate between participants of the same role.
  - `model` string
  - `organization_id` unknown

## Response `200`

A chat completion response returned by model, based on the provided input.

- object
  - `id` string
  - `created` integer
  - `model` string
  - `choices` object[]
    - `index` integer
    - `message` object
      - `role` string
      - `content` string
      - `refusal` string
      - `annotations` object[]
        - `type` string
        - `url_citation` object
          - `end_index` integer — The index of the last character of the URL citation in the message.
          - `start_index` integer — The index of the first character of the URL citation in the message.
          - `title` string — The title of the web resource.
          - `url` string — The URL of the web resource.
    - `finish_reason` union
      - string
      - string
      - string
      - string
  - `usage` object
    - `prompt_tokens` integer
    - `completion_tokens` integer
    - `total_tokens` integer
    - `prompt_tokens_details` object
      - `cached_tokens` integer
      - `audio_tokens` integer
    - `completion_tokens_details` object
      - `reasoning_tokens` integer
      - `audio_tokens` integer
      - `accepted_prediction_tokens` integer
      - `rejected_prediction_tokens` integer
  - `service_tier` string
  - `system_fingerprint` string

---

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