Skip to main content
Routeway provides a set of account endpoints that let you monitor spending, review request history, and manage API keys — all without leaving your codebase or touching the dashboard.
Account endpoints require a management key, not a regular API key. Management keys are separate credentials with access to account operations. Create one from Dashboard → Management Keys.

Available Endpoints

Usage & Billing

MethodPathDescription
GET/v1/account/balanceCurrent credit balance
GET/v1/account/activityPaginated request history with cost per call
GET/v1/account/analyticsAggregated usage metrics over time

API Keys

MethodPathDescription
GET/v1/account/keysList all API keys
POST/v1/account/keysCreate a new API key
GET/v1/account/keys/:idGet details for a specific key
PATCH/v1/account/keys/:idUpdate key settings
DELETE/v1/account/keys/:idDelete an API key

Rate Limits

Routeway applies rate limits per endpoint to ensure system stability and fair usage across all users. Each endpoint is governed by two limits:
  • Burst limit — maximum number of requests allowed within a 10-second window
  • Sustained limit — maximum number of requests allowed per minute
When a limit is exceeded, the API returns a 429 Too Many Requests response. Clients should implement retry logic with exponential backoff.

Quick Example — Check Your Balance

import os
import requests

# Account endpoints require a management key
headers = {"Authorization": f"Bearer {os.getenv('ROUTEWAY_MANAGEMENT_KEY')}"}

response = requests.get("https://api.routeway.ai/v1/account/balance", headers=headers)
data = response.json()

print(f"Balance: ${data['balance']:.2f}")
{
  "balance": 4.20
}

What’s in This Section

Balance & Usage

Check your credit balance, review request activity logs, and query aggregated analytics to understand spending patterns.

API Key Management

Create, list, update, and delete API keys programmatically. Configure daily limits, minute limits, model whitelists, and subscription settings per key.

Authentication

Account endpoints require a management key passed as a Bearer token:
Authorization: Bearer YOUR_MANAGEMENT_KEY
Management keys are separate from regular API keys and can only be created from the Dashboard → Management Keys page.
Regular API keys (used for model requests) cannot access account endpoints. Always use a management key for these operations.