---
title: "Playground"
method: POST
path: "/pg/chat/completions"
tags: ["Playground"]
---

# Playground

`POST /pg/chat/completions`

## Request

- Base URL: `https://api.unorouter.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.unorouter.com/pg/chat/completions`
- Auth: one of:
  - API key in header `Authorization` and API key in header `New-Api-User`
  - API key in header `New-Api-User` and API key in cookie `session`

## Response `200`

OK

- ChatCompletionResponse: ChatCompletionResponse schema
  - `choices` ChatCompletionChoice[], nullable, required
    - `finish_reason` string, required
    - `index` integer, required
    - `message` ChatMessage, required
      - `content` string, required
      - `role` string, required
  - `created` integer, required
  - `id` string, required
  - `model` string, required
  - `object` string, required
  - `usage` CompletionUsage, required
    - `completion_tokens` integer, required
    - `prompt_tokens` integer, required
    - `total_tokens` integer, required

---

[API](https://skmtc.dev/unorouter/apis/new-api.md) - [All operations](https://skmtc.dev/unorouter/apis/new-api/llms.txt) - [OpenAPI document](https://skmtc.dev/unorouter/apis/new-api/revisions/1b50ada14f59?raw)
