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

# Account Management

> Manage operational account workflows with provisioning-key-protected endpoints.

Administrative account workflows live under `/v1/account/*` and require a provisioning key rather than a standard inference key.

These endpoints are the operational layer for cost control, usage analysis, and key management across projects or environments.

## Main account workflows

| Workflow                           | Endpoint                                           |
| ---------------------------------- | -------------------------------------------------- |
| Check balance                      | `GET /v1/account/balance`                          |
| Review activity                    | `GET /v1/account/activity`                         |
| List or create API keys            | `GET /v1/account/keys`, `POST /v1/account/keys`    |
| Inspect, update, or delete one key | `GET`, `PATCH`, `DELETE /v1/account/keys/{key_id}` |

## What Lives Here

* balance inspection
* usage and activity reporting
* API key lifecycle management

## What You Can Do

* monitor remaining credits before large jobs or batch runs
* inspect request volume, spend, and top models over time
* split usage by API key for teams, apps, or environments
* create separate keys for production, staging, development, and CI
* apply per-key credit limits as lightweight budget controls

<CardGroup cols={2}>
  <Card title="API Keys" icon="key" href="/account/api-keys">
    Create, rotate, limit, and organize keys by environment or team.
  </Card>

  <Card title="Balance and Activity" icon="chart-line" href="/account/balance-and-activity">
    Check credits, usage trends, and model-level spend.
  </Card>

  <Card title="Pricing and Billing" icon="credit-card" href="/build/billing">
    Review how paid model access and account balance work.
  </Card>
</CardGroup>

## Authentication Reminder

Use:

```bash theme={null}
Authorization: Bearer YOUR_PROVISIONING_KEY
```

You can obtain the provisioning key from the [NagaAI Dashboard](https://naga.ac/dashboard/provisioning-keys).

## Quick Operational Check

<CodeGroup>
  ```python Python theme={null}
  import requests

  response = requests.get(
      "https://api.naga.ac/v1/account/balance",
      headers={"Authorization": "Bearer YOUR_PROVISIONING_KEY"},
  )
  response.raise_for_status()

  print(response.json()["balance"])
  ```

  ```javascript Node.js theme={null}
  const response = await fetch('https://api.naga.ac/v1/account/balance', {
    headers: {
      Authorization: 'Bearer YOUR_PROVISIONING_KEY',
    },
  });

  if (!response.ok) {
    throw new Error(`Request failed: ${response.status}`);
  }

  const data = await response.json();
  console.log(data.balance);
  ```

  ```bash cURL theme={null}
  curl https://api.naga.ac/v1/account/balance \
    -H "Authorization: Bearer YOUR_PROVISIONING_KEY"
  ```
</CodeGroup>

<Warning>
  Provisioning keys are more privileged than standard inference keys. Store them
  separately and never embed them in client-side applications.
</Warning>

## When to use these endpoints

* before running large jobs that depend on paid models
* when you need internal dashboards or billing alerts
* when you want separate keys for production, staging, CI, or customer-specific workloads

## Main Workflows

### Balance Monitoring

Use balance checks when you need to:

* stop jobs before credits run out
* alert on low-balance conditions
* integrate billing visibility into internal tooling

### Activity Analysis

Activity reports help you answer:

* which models cost the most
* how usage changes day by day
* which API keys or projects are driving spend

### API Key Management

Use multiple API keys when you want:

* production and staging separation
* per-environment blast-radius reduction
* per-key credit limits for budget control
* simpler cost attribution by team or project

## Related Docs

* [API Keys](/account/api-keys)
* [Balance and Activity](/account/balance-and-activity)
* [Pricing and Billing](/build/billing)
