Skip to main content
Query your token usage and costs programmatically. All costs in INR.

Get usage

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

Parameters

ParameterTypeRequiredDescription
startstring (ISO date)YesStart date (inclusive)
endstring (ISO date)YesEnd date (inclusive)
group_bystringNomodel (default), key, day

Response

{
  "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
    }
  ]
}
All costs in INR. This is an India differentiator — no USD conversion needed.

Group by API key

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.