Documentation
Welcome to the docs. The cabbage is watching.
Contents
Getting Started
1
Register
Create an account via the web interface or the API:
curl -X POST https://api.turbocabbage.ru/auth/register \
-H 'Content-Type: application/json' \
-d '{"email":"you@company.com","password":"your-password","name":"Your Name"}'
2
Log in and get your token
Exchange credentials for a JWT access token:
curl -X POST https://api.turbocabbage.ru/auth/login \
-H 'Content-Type: application/json' \
-d '{"email":"you@company.com","password":"your-password"}'
3
Create an agent
Save the API key immediately -- it is displayed only once.
curl -X POST https://api.turbocabbage.ru/auth/create-agent \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Content-Type: application/json' \
-d '{"name":"my-agent"}'
4
Start chatting
Send a message and get an LLM response through your subscription:
curl -X POST https://api.turbocabbage.ru/chat/conversations/CONV_ID/messages \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Content-Type: application/json' \
-d '{"content":"Check my Wildberries orders for today"}'
Auth API
All endpoints under /auth/. JWT tokens via Authorization: Bearer <token>.
| Method | Endpoint | Auth | Description |
|---|---|---|---|
| POST | /auth/register | -- | Create account |
| POST | /auth/login | -- | Get JWT tokens |
| POST | /auth/refresh | -- | Refresh access token |
| GET | /auth/me | JWT | Get profile |
| POST | /auth/create-agent | JWT | Create agent + API key |
| POST | /auth/change-password | JWT | Change password |
| POST | /auth/forgot-password | -- | Request password reset |
| POST | /auth/reset-password | -- | Reset with token |
Billing API
All endpoints under /billing/.
| Method | Endpoint | Auth | Description |
|---|---|---|---|
| GET | /billing/plans | -- | List available plans |
| GET | /billing/subscription | JWT | Current plan + usage |
| POST | /billing/subscribe | JWT | Subscribe or change plan |
| GET | /billing/usage | JWT | Token usage details |
| POST | /billing/overage-policy | JWT | Set hard_cutoff or pay_per_token |
Chat API
All endpoints under /chat/.
| Method | Endpoint | Auth | Description |
|---|---|---|---|
| GET | /chat/conversations | JWT | List conversations |
| POST | /chat/conversations | JWT | Create conversation |
| POST | /chat/conversations/:id/messages | JWT | Send message + get LLM reply |
Agent API
All endpoints under /agent/.
| Method | Endpoint | Auth | Description |
|---|---|---|---|
| POST | /agent/run | JWT | Start autonomous agent task |
| GET | /agent/status/:id | JWT | Check progress, see step-by-step execution |
| POST | /agent/stop/:id | JWT | Cancel a running agent |
| GET | /agent/history | JWT | List past agent runs |
Sabaki Queue API
Human-in-the-loop approval queue.
| Method | Endpoint | Auth | Description |
|---|---|---|---|
| GET | /sabaki/cards | JWT | List cards in the queue |
| POST | /sabaki/cards/:id/resolve | JWT | Approve/reject, resumes linked agent |
| GET | /sabaki/stats | JWT | Queue statistics |
Triggers API
Scheduled and webhook-based agent activation.
| Method | Endpoint | Auth | Description |
|---|---|---|---|
| POST | /triggers | JWT | Create a scheduled trigger |
| POST | /triggers/:id/fire | JWT | Manually fire a trigger |
LLM Proxy (OpenAI-compatible)
Use your agent API key with any OpenAI-compatible client. Endpoint: /llm/v1/.
curl -X POST https://api.turbocabbage.ru/llm/v1/chat/completions \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "openrouter/healer-alpha",
"messages": [{"role": "user", "content": "Hello!"}]
}'
For MCP clients, connect to /mcp with Authorization: Bearer <api-key> on the initialize request. Reuse the Mcp-Session-Id header for subsequent calls.
Known Limitations
- No email delivery yet. Email verification and password reset tokens are logged to the server console. Ask the admin for your token.
- No streaming. Chat responses arrive all at once.
- Tochka Bank payments not live. Billing tracks usage but does not process real payments yet.
- Single SQLite database. Not yet migrated to PostgreSQL -- expect resets between test cycles.