---
title: "Creates a completion for the provided prompt and parameters."
method: POST
path: "/v1/completions/"
tags: ["Completions"]
---

# Creates a completion for the provided prompt and parameters.

`POST /v1/completions/`

Given a prompt, the model will return one or more predicted completions, and can also return the probabilities of alternative tokens at each position.

## Request body

- CompletionsRequest
  - `prompt` union, required
    - string
    - string[]
  - `max_tokens` integer, nullable
  - `temperature` number, nullable
  - `top_p` number, nullable
  - `n` integer, nullable
  - `stream` boolean, nullable
  - `logprobs` integer, nullable
  - `echo` boolean, nullable

## Response `200`

Successful Response

- unknown

## Other responses

- `422` — Validation Error

---

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