---
title: "Get Dashboard Stats"
method: GET
path: "/api/dashboard/stats"
tags: ["Dashboard"]
---

# Get Dashboard Stats

`GET /api/dashboard/stats`

Get dashboard statistics for authenticated user.

Returns comprehensive dashboard data including:
- Current balance
- Usage statistics
- API key summaries
- Recent activity

Query params:
- skip_cache: Force fresh data from database, bypassing Redis cache

## Query parameters

- `skip_cache` boolean — Force refresh, bypassing cache

## Response `200`

Successful Response

- DashboardStatsResponse
  - `success` boolean
  - `message` string, nullable
  - `data` DashboardStats
    - `total_uploaded_money` number — Total money uploaded to account (USD)
    - `total_used_money` number — Total money consumed via API usage (USD)
    - `wallet_balance_usd` number — Wallet balance from Stripe deposits (USD)
    - `total_available_usd` number — Total spendable balance (wallet_balance_usd)
    - `usage_percentage` number — Percentage of uploaded money used
    - `monthly_budget` number, nullable — User's monthly budget limit (USD, None for admin/unlimited)
    - `budget_used_this_month` number — Money used this month (USD)
    - `budget_remaining_this_month` number, nullable — Budget remaining this month (USD, None for unlimited)
    - `budget_percentage` number — Percentage of monthly budget used
    - `spend_this_month` number — Total money spent this month (USD)
    - `total_api_calls` integer — Total API calls (all time)
    - `api_calls_this_month` integer — API calls in current month
    - `active_api_keys` integer — Number of active API keys
    - `cloud_calls_this_month` integer — API calls this month sourced from cloud SDK / direct API
    - `onprem_calls_this_month` integer — API calls this month sourced from on-prem instances
    - `days_until_month_reset` integer — Days until current month ends
    - `current_month` string — Current month (YYYY-MM format)
    - `avg_compression_ratio` number — Average compression ratio (last 30 days)
    - `total_tokens_saved` integer — Total tokens saved (all time)
    - `tokens_saved_this_month` integer — Tokens saved this month
    - `total_input_tokens_this_month` integer — Total input tokens processed this month
    - `tier` 'tier1' | 'tier2' | 'tier3' | 'tier4' | 'tier5'
    - `account_type` 'user' | 'enterprise' — Account type: determines billing mode and allowed API key scopes. - USER: Prepaid wallet billing, can create user-scope keys - ENTERPRISE: Postpaid invoice billing, can create enterprise-scope keys
    - `is_admin` boolean — Whether user is admin (infinite usage)
    - `account_created_at` string, nullable — Account creation date
    - `api_key_usage` ApiKeyUsageSummary[] — Usage breakdown per API key
      - `api_key_id` string, required — API key UUID
      - `api_key_name` string, required — API key name
      - `requests_this_month` integer — Requests made this month (resets monthly)
      - `money_used_this_month` number — Money used via this key this month (USD)
      - `budget_limit` number, nullable — Budget limit for this key (USD)
      - `budget_remaining` number, nullable — Budget remaining for this key (USD)
      - `total_requests` integer — Total requests (lifetime)
      - `total_cost_usd` number — Total cost spent via this key (lifetime, USD)
      - `created_at` string, nullable — Key creation timestamp (ISO)
      - `expires_at` string, nullable — Key expiration timestamp (ISO); null = never
    - `enterprise_keys` EnterpriseKeyUsage[] — Usage for enterprise (postpaid) API keys
      - `api_key_id` string, required — API key UUID
      - `api_key_name` string — API key name
      - `scope` 'demo' | 'user' | 'enterprise'
      - `billing_mode` 'postpaid' — Billing mode (postpaid)
      - `current_balance_usd` number — Current balance/debt (USD)
      - `current_month_usage_usd` number — Current month usage (USD)
      - `credit_limit_usd` number — Credit limit (USD)
      - `credit_remaining_usd` number — Remaining credit (USD)
      - `monthly_budget_usd` number, nullable — Monthly spending budget
      - `budget_utilization_percent` number, nullable — Budget usage percentage
      - `is_over_budget` boolean — Whether over budget
      - `total_requests` integer — Total requests (lifetime)
      - `current_month_requests` integer — Requests in the current billing month
      - `last_used_at` string, nullable — Last used timestamp
      - `total_cost_usd` number — Total cost spent via this key (lifetime, USD)
      - `created_at` string, nullable — Key creation timestamp (ISO)
      - `expires_at` string, nullable — Key expiration timestamp (ISO); null = never
    - `has_unpaid_invoices` boolean — Whether user has any unpaid enterprise invoices
    - `unpaid_invoice_amount_usd` number — Total amount of unpaid enterprise invoices (USD)
    - `top_models` ModelStatsItem[] — Top 3 most used models with usage stats
      - `model` string, required — Model name
      - `requests` integer — Number of requests
      - `input_tokens` integer — Original input tokens
      - `compressed_input_tokens` integer — Compressed input tokens
      - `output_tokens` integer — Output tokens
      - `cost_usd` number — Cost in USD

## Other responses

- `422` — Validation Error
- `500` — Internal Server Error

---

[API](https://skmtc.net/compresr/apis/compresr-platform-api.md) · [All operations](https://skmtc.net/compresr/apis/compresr-platform-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/compresr/compresr-platform-api/revisions/93ee959dfa51/schema)
