---
title: "Post Completion"
method: POST
path: "/v2/completions"
tags: ["completions"]
---

# Post Completion

`POST /v2/completions`

One-shot chat completion proxied to the inference gateway.

## Request body

- CompletionRequest
  - `model` string, required
  - `messages` ChatMessage[], required
    - `role` string, required
    - `content` union, required
      - string
      - object[]
  - `max_tokens` integer

## Response `200`

Successful Response

- CompletionResponse
  - `content` string, required
  - `model` string, required

## Other responses

- `400` — Invalid or malformed request
- `401` — Missing or invalid credentials
- `403` — Caller may not access this resource
- `404` — Referenced entity does not exist
- `409` — Resource already exists
- `422` — Validation Error

---

[API](https://skmtc.dev/hud/apis/hud-platform.md) · [All operations](https://skmtc.dev/hud/apis/hud-platform/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/hud/hud-platform/revisions/58558fc733d9/schema)
