The betool web admin relies on an authenticated REST API (/api prefix), which you can also use from your own scripts: custom consumption dashboards, log export, credit balance monitoring.
Authentication
Every call carries a session token in Authorization: Bearer. For automated use, create a long-lived CLI token from the organisation menu → Organisation settings → CLI tokens (the plaintext is shown only once, revocable at any time, hashed server-side), then exchange it for a session token:
# 1. Exchange the CLI token for a session (rate-limited: 10/min)
curl -X POST https://platform.betool.ai/api/auth/cli-login \
-H "Content-Type: application/json" \
-d "{\"token\": \"$BETOOL_CLI_TOKEN\"}"
# -> {"session_token": "...", "user": {...}, "active_org": {...}, ...}
# 2. Call the API with the session
curl -H "Authorization: Bearer $BETOOL_SESSION" \
https://platform.betool.ai/api/auth/me
A CLI token is pinned to one organisation; it stops working if its holder is deactivated or is no longer an active member of that organisation. Rights follow its membership.
Filtering
List endpoints accept parameters specific to each resource (typically a server-bounded limit); the available fields are documented by the response itself.
Key endpoints
| Endpoint | Description |
|---|---|
GET /api/auth/me | Identity, active organisation, memberships |
GET /api/admin/models | List models (pipelines) |
GET /api/admin/llm/accounts | List LLM accounts (secret masked, has_api_key) |
GET /api/admin/billing/state | Plan, credit balance, auto top-up |
POST /api/admin/billing/topup | Manual top-up (payment link) |
GET /api/admin/billing/usage | Consumption log (limit ≤ 500, source_kind filter) |
GET /api/admin/me/supervisor-reads | Cross-tenant access audit log |
To drive the configuration in natural language (create/edit a pipeline through proposals, applied only once accepted), prefer the MCP server: it is the surface designed for external clients.
Outbound webhooks
Need to push events to your systems? Emit them from your pipelines with the webhook_action node — see Outbound webhooks.
Rate limiting
Authentication endpoints (signup, login, reset) are rate-limited. Other endpoints have no published quota at this time — intensive automated usage should remain reasonable.
SDKs
There is no official SDK. The API is simple enough to consume from any language with an HTTP client.
If you write an SDK for your organisation, let us know — we will list it.