Skip to content

Get up and running with Kimi, GLM, MiniMax, DeepSeek, gpt-oss, Qwen, Gemma and other models.

1.7 KB
Raw Blame
---
title: Balance
sidebarTitle: /api/balance
openapi: /openapi.yaml GET /api/balance
---

<RequestExample>

```shell Request
curl https://ollama.com/api/balance \
  -H "Authorization: Bearer $OLLAMA_API_KEY"
```

</RequestExample>

<ResponseExample>

```json Response
{
  "included": {
    "balance_usd": 72.5,
    "allowance_usd": 100,
    "period": {
      "from": "2026-09-15T09:30:00Z",
      "until": "2026-10-15T09:30:00Z"
    }
  },
  "purchased": {
    "balance_usd": 25
  }
}
```

</ResponseExample>

This endpoint takes no query parameters. For usage history, see [Cloud usage](/api/cloud-usage).

## Balances

The included period follows your plan's monthly reset schedule, including for annual subscriptions. Period timestamps are in UTC, with `from` inclusive and `until` exclusive.

The purchased balance includes only unexpired credits.

<Accordion title="Legacy plans">

Plans with session and weekly limits return `session` and `weekly` in `included`:

```json
{
  "included": {
    "session": {
      "remaining_percent": 75,
      "resets_at": "2026-10-01T07:00:00Z"
    },
    "weekly": {
      "remaining_percent": 40,
      "resets_at": "2026-10-05T00:00:00Z"
    }
  },
  "purchased": {
    "balance_usd": 25
  }
}
```

`remaining_percent` ranges from `0` to `100`; `75` means 75% remains. `resets_at` is the next reset time in UTC.

</Accordion>

## Rate limits

This endpoint allows 10 requests per minute per user, shared across API keys and devices. We recommend polling once per minute. A `429` response includes a `Retry-After` header with the number of seconds to wait before retrying.

## Teams

All team members share the same included and purchased balances.

## Reference