docs/en/dev/openapi.md
Starting from v4.18.0, AstrBot provides API Key based HTTP APIs for programmatic access.
Authorization: Bearer abk_xxx
Also supported:
X-API-Key: abk_xxx
username is required:POST /api/v1/chat: request body must include usernameGET /api/v1/chat/sessions: query params must include usernamePOST /api/v1/chat: send chat message (SSE stream, server generates UUID when session_id is omitted)GET /api/v1/chat/sessions: list sessions for a specific username with paginationGET /api/v1/configs: list available config filesPOST /api/v1/file: upload attachmentPOST /api/v1/im/message: proactive message via UMOGET /api/v1/im/bots: list bot/platform IDscurl -N 'http://localhost:6185/api/v1/chat' \
-H 'Authorization: Bearer abk_xxx' \
-H 'Content-Type: application/json' \
-d '{"message":"Hello","username":"alice"}'
Use the interactive docs: