> ## Documentation Index
> Fetch the complete documentation index at: https://docs.routeway.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Overview

> Monitor usage, check balances, and manage API keys programmatically.

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.

<Info>
  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](https://routeway.ai/dashboard/management-keys).
</Info>

## Available Endpoints

### Usage & Billing

| Method                           | Path                                                      | Description                                  |
| -------------------------------- | --------------------------------------------------------- | -------------------------------------------- |
| <Badge color="green">GET</Badge> | [/v1/account/balance](/api-reference/Account/balance)     | Current credit balance                       |
| <Badge color="green">GET</Badge> | [/v1/account/activity](/api-reference/Account/activity)   | Paginated request history with cost per call |
| <Badge color="green">GET</Badge> | [/v1/account/analytics](/api-reference/Account/analytics) | Aggregated usage metrics over time           |

### API Keys

| Method                              | Path                                                       | Description                    |
| ----------------------------------- | ---------------------------------------------------------- | ------------------------------ |
| <Badge color="green">GET</Badge>    | [/v1/account/keys](/api-reference/Account/keys-list)       | List all API keys              |
| <Badge color="blue">POST</Badge>    | [/v1/account/keys](/api-reference/Account/keys-create)     | Create a new API key           |
| <Badge color="green">GET</Badge>    | [/v1/account/keys/:id](/api-reference/Account/keys-get)    | Get details for a specific key |
| <Badge color="orange">PATCH</Badge> | [/v1/account/keys/:id](/api-reference/Account/keys-update) | Update key settings            |
| <Badge color="red">DELETE</Badge>   | [/v1/account/keys/:id](/api-reference/Account/keys-delete) | Delete 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.

| Method                              | Endpoint                                                   | Burst (10s) | Per Minute |
| ----------------------------------- | ---------------------------------------------------------- | ----------: | ---------: |
| <Badge color="green">GET</Badge>    | [/v1/account/balance](/api-reference/Account/balance)      |          10 |        120 |
| <Badge color="green">GET</Badge>    | [/v1/account/activity](/api-reference/Account/activity)    |           5 |         60 |
| <Badge color="green">GET</Badge>    | [/v1/account/analytics](/api-reference/Account/analytics)  |           2 |         25 |
| <Badge color="green">GET</Badge>    | [/v1/account/keys](/api-reference/Account/keys-list)       |           5 |         60 |
| <Badge color="green">GET</Badge>    | [/v1/account/keys/:id](/api-reference/Account/keys-get)    |           5 |         60 |
| <Badge color="blue">POST</Badge>    | [/v1/account/keys](/api-reference/Account/keys-create)     |           2 |         12 |
| <Badge color="orange">PATCH</Badge> | [/v1/account/keys/:id](/api-reference/Account/keys-update) |           2 |         15 |

## Quick Example — Check Your Balance

<Tabs>
  <Tab title="Python">
    ```python theme={null}
    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}")
    ```
  </Tab>

  <Tab title="Node.js">
    ```javascript theme={null}
    const response = await fetch("https://api.routeway.ai/v1/account/balance", {
      headers: {
        Authorization: `Bearer ${process.env.ROUTEWAY_MANAGEMENT_KEY}`,
      },
    });

    const data = await response.json();
    console.log(`Balance: $${data.balance.toFixed(2)}`);
    ```
  </Tab>

  <Tab title="cURL">
    ```bash theme={null}
    curl https://api.routeway.ai/v1/account/balance \
      -H "Authorization: Bearer $ROUTEWAY_MANAGEMENT_KEY"
    ```
  </Tab>
</Tabs>

```json theme={null}
{
  "balance": 4.20
}
```

***

## What's in This Section

<CardGroup cols={2}>
  <Card title="Balance & Usage" icon="chart-line" href="/account-management/balance-and-usage">
    Check your credit balance, review request activity logs, and query aggregated analytics to understand spending patterns.
  </Card>

  <Card title="API Key Management" icon="key" href="/account-management/api-key-management">
    Create, list, update, and delete API keys programmatically. Configure daily limits, minute limits, model whitelists, and subscription settings per key.
  </Card>

  <Card title="Web Search BYOK" icon="search" href="/guides/chat-completions/web-search-byok">
    Add Tavily, Exa, or Valyu keys in Settings and use your own search provider with `@online` chat requests.
  </Card>
</CardGroup>

***

## 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](https://routeway.ai/dashboard/management-keys) page.

<Warning>
  Regular API keys (used for model requests) cannot access account endpoints. Always use a management key for these operations.
</Warning>
