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

# Read usage and plan call capacity

> Read Nixflex usage and call capacity, interpret optional reservation fields and separate account counters from invoices and external telephone charges.

**FIXED · account** Agents are unlimited. There is no fee per agent. Customers pay only for usage (minutes and texts). Many customers can use one shared agent, each with its own number and number prompt. Use separate agents only for different knowledge or agent settings. List page size, knowledge-base quotas and simultaneous-call limits do not cap agent count.

**NOT OFFERED → do this instead · number** A separate agent does not create a separate account capacity budget. Pace each business within the account-wide call budget.

**YOU CAN CHANGE · call** Save the customer and verified business number with each request.

**SCOPE · agent** Group numbers by the knowledge and agent settings their customers need. Attribute each customer’s usage to its verified business number.

[Read the compact AI rules](https://docs.nixflex.com/ai-rules.md#billing-usage)

Read the account’s usage and capacity without treating counters as invoices or a promise that the next call will start.

Public read: **GET /usage** · Capacity: **Current max\_concurrent** · Payments: **Dashboard workflow**

**The important part**

* Null or absent values mean unknown, not zero.
* Call capacity and HTTP request limits are separate.
* Payments and saved payment methods use the permitted dashboard workflow.

[Business guide](https://docs.nixflex.com/guides/business/billing.md) · [API reference](https://docs.nixflex.com/api-reference/introduction.md) · [Glossary](https://docs.nixflex.com/guides/glossary.md)

## Prerequisites

Keep the account credential in `NIXFLEX_API_KEY` on your server. SDK and CLI examples require Node/CLI 0.11.0 or later or Python 0.4.0 or later. Use identifiers owned by the intended account. Raw HTTP base URL: `https://api.nixflex.com/v1`. Node and Python SDK base URL: `https://api.nixflex.com`. The SDK adds `/v1`.

## 1. Read current usage

Node and Python below use their standard HTTP clients. Keep `NIXFLEX_API_KEY` on the server. The CLI examples require a CLI version that supports the command; see [release status](https://docs.nixflex.com/sdks/ecosystem.md). No example retries a mutation automatically.

```bash cURL theme={"dark"}
curl --fail-with-body --request GET \
  --url "https://api.nixflex.com/v1/usage" \
  --header "Authorization: Bearer $NIXFLEX_API_KEY"
```

```javascript Node theme={"dark"}
const response = await fetch('https://api.nixflex.com/v1/usage', {
  method: 'GET',
  redirect: 'error',
  signal: AbortSignal.timeout(30_000),
  headers: { Authorization: `Bearer ${process.env.NIXFLEX_API_KEY}` },
});
const result = await response.json();
if (!response.ok) throw new Error(`HTTP ${response.status}: ${result?.error?.code ?? "unavailable"}`);
// Handle the private result without logging the full response.
```

```python Python theme={"dark"}
import os, json
from urllib.request import HTTPRedirectHandler, Request, build_opener

class NoRedirect(HTTPRedirectHandler):
    def redirect_request(self, request, file, code, message, headers, new_url):
        return None

request = Request(
    'https://api.nixflex.com/v1/usage',
    method='GET',
    headers={'Authorization': 'Bearer ' + os.environ['NIXFLEX_API_KEY']},
)
with build_opener(NoRedirect).open(request, timeout=30) as response:
    result = json.load(response)
    # Handle the private result without logging it.
```

```powershell CLI (PowerShell) theme={"dark"}
nixflex usage --json --base-url https://api.nixflex.com
```

## 2. Preserve unknown values

Keep null and absent fields distinct from zero. `total_cost` is a stored account value, not an invoice or complete total of external telephone charges. Avoid exposing money fields to Member dashboard sessions.

## 3. Use current capacity

Use the returned `max_concurrent`, not a hard-coded unlimited promise. The default is 10 when no positive limit is stored. Optional `occupied_call_slots` includes unresolved owned reservations, not only connected conversations.

## 4. Handle current admission

Balance, capacity and active-state checks run when work is admitted. A successful usage read does not reserve a slot or guarantee the next call will start. Respect admission refusals and contact holds.

## 5. Reconcile payment changes in Billing

Owner and Admin can use Billing. A charge, top-up, auto top-up setting and saved payment method have separate confirmation states. Keep pending or uncertain outcomes visible and do not repeat a charge merely because a browser response was lost.

## Example response

For example, `{"total_calls":12,"total_minutes":18.5,"total_cost":null,"max_concurrent":10}` is a usage snapshot with an unknown cost, not a zero-cost invoice.

## Errors and limits

| Condition | Handling |
| - | - |
| 401 | Check account authentication. |
| 429 | Respect effective request limits. |
| Optional occupancy missing | Do not infer zero active work. |
| Capacity reached | Wait for work to settle; a usage read is not a reservation. |
| Payment pending | Reconcile in Billing before another payment. |

## Next steps

* [Usage reference](https://docs.nixflex.com/api-reference/account/usage.md)
* [Call results](https://docs.nixflex.com/guides/developer/call-history.md)
* [Team permissions](https://docs.nixflex.com/concepts/organisations.md)

## Related dashboard and AI tasks

* [Add credit and set up automatic recharge](https://docs.nixflex.com/guides/business/billing/add-credit.md)
* [Check charges and download billing documents](https://docs.nixflex.com/guides/business/billing/check-charges.md)
* [Resolve an uncertain or failed payment](https://docs.nixflex.com/guides/business/billing/fix-payments.md)
* [Understand usage and your business costs](https://docs.nixflex.com/guides/pricing-basics.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.