getGatewayUsage
Read managed-AI-gateway usage and exact cost for a project, with totals, per-model breakdown, and credit balance. Use for spend reports, identifying dominant models, and grounding model choices in real cost.
Instructions
Read account-scoped managed-AI-gateway usage + exact cost for a project over a recent window. Returns { window, totals, byModel, creditBalanceUsd }: totals carry token counts, response count, and the exact list-price USD cost from the billing ledger; byModel breaks the same down per model (biggest first). METADATA ONLY — token counts and cost, never transcripts/audio/prompt content. Only managed-gateway + dashboard-vault-BYOK sessions are metered; a code-direct setOpenaiApiKey() bypass goes straight to OpenAI and is invisible here. Account-scoped + read-only — requires a linked Extentos account (a 401 returns account_required, run extentos-mcp login). USE to report spend, spot the dominant model, or ground a model-choice recommendation in real cost (pair with getAssistantConfig). DON'T USE for live per-event traces (use getEventLog) or to change config (use setAssistantConfig).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| days | No | Look-back window in days. Default 30. Clamped to [1, 365]. Bucketing auto-scales (hour ≤2d, day ≤92d, week ≤183d, else month). | |
| appPackage | Yes | The app's package / bundle id (project_install_id). |