Tera Router

Dashboard REST API

Reference for the REST endpoints that manage keys, providers, chains, guardrails, and usage.

All endpoints below live on the same server as the gateway (default http://localhost:8080) and power the dashboard UI. Great for automation and integrations.

For the inference endpoints, see the Gateway API section.

Authentication

# sign in
curl -X POST http://localhost:8080/v1/auth/sign-in \
  -H "Content-Type: application/json" \
  -d '{ "email": "[email protected]", "password": "..." }'
{
  "data": {
    "uid": "…",
    "email": "[email protected]",
    "access_token": "…",
    "refresh_token": "…",
    "expires_in": 3600
  }
}
  • Access tokens last 1 hour; refresh tokens 30 days and are rotated on every renewal.
  • Send the token in the Authorization: Bearer <access_token> header.
  • POST /v1/auth/sign-out revokes all session tokens.

Response envelope

ShapeJSON shape
Single resource{"data": …, "metadata": …, "message": …}
List{"data": […], "metadata": {"total", "offset", "limit"}}
Delete{"message": "…"}
Error{"message": "…"}
Validation error{"message": "…", "errors": {…}} (422)

Pagination uses the offset (0-based) and limit (default 10, max 100) query parameters.

Endpoints

Auth

MethodPathNotes
POST/v1/auth/sign-inSign in, receive tokens
POST/v1/auth/refreshRotate refresh token
GET/v1/auth/meCurrent user profile
POST/v1/auth/sign-outRevoke all session tokens

Keys

MethodPathNotes
GET / POST/v1/keysList / create keys
GET / PUT / PATCH/v1/keys/:idDetail / update key
POST/v1/keys/:id/revealReturn key plaintext (audited)
DELETE/v1/keys/:idDelete key

Plans

MethodPathNotes
GET / POST/v1/plansList / create
GET/v1/plans/:idDetail
GET/v1/plans/:id/keysKeys on this plan
PUT / PATCH/v1/plans/:idUpdate
DELETE/v1/plans/:idDelete

Routing

MethodPathNotes
GET / POST/v1/chainsList / create chains
GET/v1/chains/:idChain detail
GET/v1/chains/:id/usageChain usage
PUT / PATCH/v1/chains/:idUpdate chain
DELETE/v1/chains/:idDelete chain
GET / PUT / DELETE/v1/models/aliasManage alias pools

Providers & accounts

MethodPathNotes
GET/v1/providersConnected/available provider summary
GET/v1/providers/ratesPricing snapshot
GET / POST/v1/custom-providersCustom providers
PUT / PATCH / DELETE/v1/custom-providers/:idManage custom provider
POST/v1/validate-keyTest credentials before saving
GET / POST/v1/accountsList / add accounts
POST/v1/accounts/bulkAdd many accounts at once
GET / PUT / PATCH / DELETE/v1/accounts/:idManage account
POST/v1/accounts/:id/testTest account connection
POST/v1/accounts/:id/revealReturn credentials (audited)
GET/v1/accounts/:id/quotaAccount quota
POST/v1/accounts/:id/quota/resetReset account quota
POST/v1/providers/:id/accounts/disable-all / enable-allBulk per provider
DELETE/v1/providers/:id/accounts/disabled / allBulk delete

Budgets & usage

MethodPathNotes
GET / POST/v1/budgetsList / create budgets
GET/v1/budgets/statusRunning usage per budget
PUT / PATCH / DELETE/v1/budgets/:idManage budget
GET/v1/usage?range=today|24h|7d|30dRequest/token/cost/latency summary
GET/v1/usage/modelsUsage per model
GET/v1/usage/insightsSummary + daily trend + per model
GET/v1/usage/telemetryFull Usage page payload
GET/v1/quotaActive quotas
GET/v1/quota/overviewQuota summary
PATCH / DELETE/v1/quota/:idPause / delete quota

Proxy pools

MethodPathNotes
GET / POST/v1/proxy-poolsList / create pools
POST/v1/proxy-pools/health-checkCheck all pools
PUT / PATCH / DELETE/v1/proxy-pools/:idManage pool
POST/v1/proxy-pools/:id/testTest one pool

Overrides

MethodPathNotes
GET / POST / DELETE/v1/model-pricing-overridesOverride per-model pricing
GET / PUT/v1/capability-overridesOverride model capabilities
DELETE/v1/capability-overrides/:provider/:modelDelete one override
POST/v1/capability-overrides/resetReset all

Guardrails

MethodPathNotes
GET/v1/guardrailsPolicy summary
POST/v1/guardrailsCreate policy
PUT/v1/guardrails/settingsGlobal guardrail settings
POST/v1/guardrails/evaluateTest policies (dry run)
PUT / PATCH / DELETE/v1/guardrails/:idManage policies

Misc

MethodPathNotes
GET / PUT / PATCH/v1/settingsRouter settings (timeout, round-robin, etc.)
GET / POST/v1/skillsList / create skills
DELETE/v1/skills/:idDelete skill
GET / DELETE/v1/consoleRing buffer log (500 entries) / clear
GET/v1/system/statsHost & process metrics
GET/v1/mediaMedia provider catalog
GET/healthServer health (no auth)

On this page