Get conversation spend
/api/chat/conversations/{id}/spendWhat this conversation has used and cost, every version of it included.
Needs the UseAiChat permission.
An API key, made on Settings, API keys. Every key starts with mbk_.
In: header
Path Parameters
uuidResponse Body
application/json
application/problem+json
application/problem+json
application/problem+json
curl -X GET "https://example.com/api/chat/conversations/497f6eca-6276-4993-bfeb-53cbbbba6f08/spend"{ "cost": 0.1, "inputTokens": 0, "cachedInputTokens": 0, "outputTokens": 0, "unpricedTokens": 0, "tokens": 0, "partUnknown": true}Read another version POST
Read another version of a message, and the reply that followed it. Needs the `UseAiChat` permission.
Send chat message POST
Ask a question; the reply streams back as server-sent events. Events: `conversation` {id, title, updatedAt}, sent again at the end when the model named it; `message` for each stored message, the question first; `text` {text} as the reply is written; `tool` {callId, name, label} as a tool starts; `done` {outcome, error} last. Refused before streaming with 400 for an empty or too long message, 404 for a conversation or message that is not yours, 409 when Chat is off or the conversation is full, and 429 when a spend limit is reached. Needs the `UseAiChat` permission.