---
title: "Update a chat completion"
method: POST
path: "/chat/completions/{completion_id}"
tags: ["Completions"]
---

# Update a chat completion

`POST /chat/completions/{completion_id}`

## Request

- Base URL: `https://api.munito.ai/inference/v1`
- URL: `https://api.munito.ai/inference/v1/chat/completions/{completion_id}`
- Auth: one of:
  - HTTP bearer
  - API key in header `x-api-key`

Replaces the `metadata` of a completion that was created with `store: true`. Metadata is the only field you can change. Send `null` to clear it.

## Path parameters

- `completion_id` string, required

## Request body

- object
  - `metadata` object, required: Up to 16 string pairs, or `null`. A key has at most 64 characters, and a value at most 512 characters.

## Response `200`

The chat completion object with the new metadata.

## Other responses

- `400`: The body holds a field other than `metadata`, or the metadata is not valid.
- `404`: No completion with this id is stored in your workspace.

---

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