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

# Usage API

> Programmatic access to token usage and INR cost data

Query your token usage and costs programmatically. All costs in INR.

## Get usage

```bash theme={null}
GET /v1/accounts/{account_id}/usage?start=2025-01-01&end=2025-01-31&group_by=model
Authorization: Bearer $FORII_API_KEY
```

### Parameters

| Parameter  | Type              | Required | Description                     |
| ---------- | ----------------- | -------- | ------------------------------- |
| `start`    | string (ISO date) | Yes      | Start date (inclusive)          |
| `end`      | string (ISO date) | Yes      | End date (inclusive)            |
| `group_by` | string            | No       | `model` (default), `key`, `day` |

### Response

```json theme={null}
{
  "data": [
    {
      "date": "2025-01-15",
      "model": "forii/deepseek-v3",
      "prompt_tokens": 1250000,
      "completion_tokens": 340000,
      "total_tokens": 1590000,
      "cost_inr": 531.50
    },
    {
      "date": "2025-01-15",
      "model": "forii/embed-v3",
      "prompt_tokens": 800000,
      "total_tokens": 800000,
      "cost_inr": 24.00
    }
  ]
}
```

<Info>
  All costs in INR. This is an India differentiator — no USD conversion needed.
</Info>

## Group by API key

```bash theme={null}
GET /v1/accounts/{account_id}/usage?group_by=key
Authorization: Bearer $FORII_API_KEY
```

Break down usage per API key for multi-team cost attribution.

## Related

* [Observability Overview](/docs/observability/overview) — Available and upcoming observability features
* [Dashboard](/docs/webapp/dashboard) — Usage in the UI
* [Pricing](/docs/concepts/pricing) — Model pricing details
