---
title: Usage Current
description: |-
  A5 usage popover payload.

  Reads the gateway's own Valkey keys via enforcement helpers. The key read
  path is IDENTICAL to _precheck_app in enforcement.py so the numbers the
  popover shows always match what the gateway enforces.

  Returns (all fields required by the A5 contract):
      context_tokens_used : int   current session context usage (0; updated by SSE)
      context_max         : int   model context window (1 000 000)
      session_4h_used     : int   tokens spent in the current 4 h window
      session_4h_cap      : int   effective 4 h cap (= session_4h * combined_mult)
      session_4h_reset_at : str   ISO-8601 UTC when the 4 h window rolls over
      weekly_used         : int   tokens spent this week (since last Saturday 00:00 Tehran)
      weekly_cap          : int   weekly cap (= weekly + boosts_sum)
      weekly_reset_at     : str   ISO-8601 UTC of next Saturday 00:00 Tehran
      plan                : str   plan_id (free | pro | max5 | max20 | …)
      off_peak_active     : bool  true inside 01:00-07:00 Tehran (tmult > 1.0)
      capacity_multiplier : float combined = min(max(tmult * lmult, 1.0), max_mult)
full: true
_openapi:
  method: GET
  route: /v1/usage/current
  toc: []
  structuredData:
    headings: []
    contents:
      - content: >-
          A5 usage popover payload.


          Reads the gateway's own Valkey keys via enforcement helpers. The key
          read

          path is IDENTICAL to _precheck_app in enforcement.py so the numbers
          the

          popover shows always match what the gateway enforces.


          Returns (all fields required by the A5 contract):
              context_tokens_used : int   current session context usage (0; updated by SSE)
              context_max         : int   model context window (1 000 000)
              session_4h_used     : int   tokens spent in the current 4 h window
              session_4h_cap      : int   effective 4 h cap (= session_4h * combined_mult)
              session_4h_reset_at : str   ISO-8601 UTC when the 4 h window rolls over
              weekly_used         : int   tokens spent this week (since last Saturday 00:00 Tehran)
              weekly_cap          : int   weekly cap (= weekly + boosts_sum)
              weekly_reset_at     : str   ISO-8601 UTC of next Saturday 00:00 Tehran
              plan                : str   plan_id (free | pro | max5 | max20 | …)
              off_peak_active     : bool  true inside 01:00-07:00 Tehran (tmult > 1.0)
              capacity_multiplier : float combined = min(max(tmult * lmult, 1.0), max_mult)
---

{/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */}

<APIPage document={"./openapi/dana-api.openapi.json"} operations={[{"path":"/v1/usage/current","method":"get"}]} webhooks={[]} hasHead={false} />