Modbot Docs

Send chat message

POST/api/chat/messages

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.

AuthorizationBearer <token>

An API key, made on Settings, API keys. Every key starts with mbk_.

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/problem+json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

curl -X POST "https://example.com/api/chat/messages" \  -H "Content-Type: application/json" \  -d '{    "conversationId": null,    "text": null,    "replaceMessageId": null,    "retryAfterMessageId": null  }'
Empty

Modbot is not endorsed by or affiliated with VRChat Inc. or Discord Inc. VRChat is a trademark of VRChat Inc. Discord is a trademark of Discord Inc. SteamVR is a trademark of Valve Corporation. Windows is a trademark of Microsoft Corporation. Docker is a trademark of Docker, Inc. PostgreSQL is a trademark of the PostgreSQL Community Association of Canada. Railway is a trademark of Railway Corp. Other names are trademarks of their respective owners; see Legal. Modbot and its logo are trademarks of the Modbot project. Open source under AGPL-3.0.