Maniac Docs
Api referenceChat

Update a stored chat completion

POST
/v1/chat/completions/{completion_id}

Update the metadata of a stored chat completion. Only metadata may be changed.

Authorization

bearerAuth
AuthorizationBearer <token>

A Maniac API key, sent as Authorization: Bearer <key>. (Internal service-to-service calls use a separate internal service key and are not documented here.)

In: header

Path Parameters

completion_id*string

The chat completion id (e.g. chatcmpl-...).

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/v1/chat/completions/string" \  -H "Content-Type: application/json" \  -d '{    "metadata": {}  }'
{  "id": "string",  "object": "chat.completion",  "created": 0,  "model": "string",  "choices": [    {      "index": 0,      "message": {        "role": "string",        "content": "string",        "tool_calls": [          {            "id": "string",            "type": "function",            "function": {              "name": "string",              "arguments": "string"            }          }        ],        "reasoning": "string"      },      "finish_reason": "stop",      "logprobs": null    }  ],  "usage": {    "prompt_tokens": 0,    "completion_tokens": 0,    "total_tokens": 0,    "prompt_tokens_details": {      "cached_tokens": 0,      "audio_tokens": 0    },    "completion_tokens_details": {      "reasoning_tokens": 0,      "audio_tokens": 0    }  },  "provider": "string",  "warnings": [    "string"  ],  "service_tier": "default",  "performance_mode": "standard",  "metadata": {    "property1": null,    "property2": null  }}
{  "error": {    "message": "string",    "type": "string",    "param": "string",    "code": "string"  }}
{  "error": {    "message": "string",    "type": "string",    "param": "string",    "code": "string"  }}
{  "error": {    "message": "string",    "type": "string",    "param": "string",    "code": "string"  }}
{  "error": {    "message": "string",    "type": "string",    "param": "string",    "code": "string"  }}
{  "error": {    "message": "string",    "type": "string",    "param": "string",    "code": "string"  }}