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

# Completion

`POST /completions`

## Request

- Base URL: `https://api.mammouth.ai` (the document declares no server; this is the origin it was published from)
- URL: `https://api.mammouth.ai/completions`
- Auth: API key in header `x-litellm-api-key`
- TypeScript: <https://skmtc.dev/mammouth/apis/mammouth-api/docs/completions/post.ts> (a function with typed inputs; its response is checked against the schema)

Follows the exact same API spec as `OpenAI's Completions API https://platform.openai.com/docs/api-reference/completions`

```bash
curl -X POST http://localhost:4000/v1/completions 
-H "Content-Type: application/json" 
-H "Authorization: Bearer sk-1234" 
-d '{
    "model": "gpt-3.5-turbo-instruct",
    "prompt": "Once upon a time",
    "max_tokens": 50,
    "temperature": 0.7
}'
```

## Query parameters

- `model` string, nullable

## Response `200`

Successful Response

- unknown

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/mammouth/apis/mammouth-api.md) - [All operations](https://skmtc.dev/mammouth/apis/mammouth-api/llms.txt) - [OpenAPI document](https://skmtc.dev/mammouth/apis/mammouth-api/revisions/0221c7d45bb1?raw)
