---
title: "Playground chat completion"
method: POST
path: "/api/v1/{workspaceID}/playground/chat/completions"
tags: ["Playground Chat"]
---

# Playground chat completion

`POST /api/v1/{workspaceID}/playground/chat/completions`

Creates a chat completion in the playground. Requires `ai.operate` or `ai.manage` permission.
Uses the same request/response format as the API key chat completion endpoint.

## Path parameters

- `workspaceID` string, required

## Request body

- PlaygroundChatRequest
  - `model` string, required — Model ID
  - `messages` object[], required
    - `role` 'user' | 'assistant' | 'system' | 'developer' | 'tool', required
    - `content` union
      - string
      - object[]
  - `stream` boolean
  - `temperature` number
  - `max_tokens` integer
  - `tools` object[]

## Response `200`

Successful response (non-streaming)

- object

## Other responses

- `401` — Missing authentication
- `402` — Payment required
- `403` — Forbidden - insufficient permissions or workspace frozen
- `503` — Service unavailable (feature disabled)

---

[API](https://skmtc.net/liara-cloud/apis/ai-playground.md) · [All operations](https://skmtc.net/liara-cloud/apis/ai-playground/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/liara-cloud/ai-playground/revisions/544ed3b7b053/schema)
