{"version":"2.1.284","anchor":"self-hosted-gateway-serves-get-apioauthusage-from-its-spe","canonical_anchor":"self-hosted-gateway-serves-get-apioauthusage-from-its-spe","heading":"Self-hosted gateways with spend limits can report usage to Claude Code","tier":"notice","area":"Gateway","url":"https:\/\/changelogs.core-directive.com\/v\/2.1.284\/e\/self-hosted-gateway-serves-get-apioauthusage-from-its-spe","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.284","markdown":"### Self-hosted gateways with spend limits can report usage to Claude Code\n\nA self-hosted gateway with spend limits now answers usage requests with each user's caps, so clients behind it can show remaining usage\n\n**What**\n\nSome organisations run their own gateway, a server that sits between Claude Code and the API, with per-user spend limits. That gateway now answers `GET \/api\/oauth\/usage` with the user's limits as JSON. It remembers each user's figures for 2 seconds.\n\n- If reading the spend data fails, it returns an error saying the spend limit is unavailable.\n\n- If no spend limits are set up on the gateway, it returns \"not configured\".\n\n**Why**\n\nClaude Code running behind such a gateway can show how much usage remains, the way it can when connected to Anthropic directly.\n\n- Area: Gateway\n- Tier: You'll notice\n- Useful: 3\/5\n- Signal: 2\/5"}