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

# POST /v1/chat/completions

`POST /v1/chat/completions`

## Request body

- CompletionsRequest
  - `messages` object[], required
    - `role` string
    - `content` string
  - `model` string, required — Model to use, see [Supported Models](/grids/cn/start/pricing/llm)
  - `stream` boolean — Whether to use server-sent events for progressive response transmission

## Response `200`

Successful response

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

## Other responses

- `400` — Parameter error
- `401` — Authorization failed

---

[API](https://skmtc.net/ttapi/apis/flowmusic-api-docs.md) · [All operations](https://skmtc.net/ttapi/apis/flowmusic-api-docs/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/ttapi/flowmusic-api-docs/versions/f27f8a59dbd0/schema)
