v106

latestOpenAPI 3.1.0raw.githubusercontent.com2026-08-02160524464.6 KB
Billing

Aggregate Billing

Returns aggregate token counts and billed totals across all completed runs since server start.

get/api/v1/billing

Response

Aggregate billing data

Example response

{
  "totals": {
    "runs": 9,
    "input_tokens": 643860,
    "output_tokens": 189720,
    "total_tokens": 833580,
    "reasoning_tokens": 12040,
    "cache_read_tokens": 85400,
    "cache_write_tokens": 9200,
    "total_usd_micros": 20340000,
    "timing": {
      "wall_time_ms": 420000,
      "inference_time_ms": 120000,
      "tool_time_ms": 60000,
      "active_time_ms": 180000
    }
  },
  "by_model": [
    {
      "model": {
        "provider": "anthropic"
      },
      "stages": 2,
      "billing": {
        "input_tokens": 28640,
        "output_tokens": 8750,
        "total_tokens": 37390,
        "reasoning_tokens": 1200,
        "cache_read_tokens": 4800,
        "cache_write_tokens": 1500,
        "total_usd_micros": 720000
      }
    }
  ]
}