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

# Credit Balance

> Read purchased, subscription-included, and available account credits in USD

Read the committed credit balance for the billing account associated with your API key. Keys on the same billing account see the same balance. This works with zero or negative balances.

The request does not run inference, spend credits, or consume inference QPS. Responses use `Cache-Control: no-store`.

## Examples

```bash cURL theme={null}
curl https://text.external-api.pangram.com/balance \
  --header "x-api-key: $PANGRAM_API_KEY"
```

```python Python SDK (1.2.0+) theme={null}
from decimal import Decimal
from pangram import Pangram

client = Pangram()  # Reads PANGRAM_API_KEY.
balance = client.get_balance()
available_usd = Decimal(balance["available_balance_usd"])
```

## Response

```json theme={null}
{
  "purchased_balance_usd": "10.00000",
  "subscription_included_balance_usd": "2.50000",
  "available_balance_usd": "12.50000"
}
```

**purchased\_balance\_usd** `string`

USD decimal string for the purchased credit balance, including non-subscription grants and adjustments.

**subscription\_included\_balance\_usd** `string`

USD decimal string for credits included with the subscription.

**available\_balance\_usd** `string`

Sum of the purchased and subscription-included balances. Balances may be negative.

Use decimal arithmetic for these amounts. They reflect committed credits at the time of the request. [`/usage`](https://docs.pangram.com/api-reference/usage) reports consumption rather than remaining credits.

## Read limits and errors

Account reads have rate limits separate from inference. Avoid continuous polling and respect `Retry-After` on HTTP `429`.

| Status | Meaning |
| - | - |
| `401` | Missing, malformed, revoked, inactive, or otherwise invalid key/account. |
| `429` | Account-read rate or concurrency limit; observe `Retry-After`. |
| `503` | Account lookup unavailable or timed out; retry the read later. |


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