CLAUDE LABJP
QUOTA — The 50 percent weekly usage boost for Claude Code subscribers ends August 19. One day left to front-load any heavy parallel workPRICING — Claude Sonnet 5's introductory rate of $2 per million input tokens and $10 output ends August 31; standard pricing of $3 and $15 takes over on September 1MIGRATION — The legacy Workbench and the experimental prompt tool APIs retired on August 17. Anything that depended on them now needs a hand-rolled equivalent on the Messages APIGOVERNMENT — Claude for Government is in beta. Anthropic remains the contracting and billing party, so agencies can start without a separate cloud provider relationshipPROVENANCE — Claude models released from August 2 onward embed a machine-readable watermark in generated text. It applies worldwide rather than only in the EU, with no stated effect on quality, speed, or priceCLI — v2.1.233 adds memory cgroup support for Bash tool commands on Linux, so CLAUDE_CODE_TOOL_MEMORY_LIMIT keeps a runaway build from stalling the sessionQUOTA — The 50 percent weekly usage boost for Claude Code subscribers ends August 19. One day left to front-load any heavy parallel workPRICING — Claude Sonnet 5's introductory rate of $2 per million input tokens and $10 output ends August 31; standard pricing of $3 and $15 takes over on September 1MIGRATION — The legacy Workbench and the experimental prompt tool APIs retired on August 17. Anything that depended on them now needs a hand-rolled equivalent on the Messages APIGOVERNMENT — Claude for Government is in beta. Anthropic remains the contracting and billing party, so agencies can start without a separate cloud provider relationshipPROVENANCE — Claude models released from August 2 onward embed a machine-readable watermark in generated text. It applies worldwide rather than only in the EU, with no stated effect on quality, speed, or priceCLI — v2.1.233 adds memory cgroup support for Bash tool commands on Linux, so CLAUDE_CODE_TOOL_MEMORY_LIMIT keeps a runaway build from stalling the session
Articles/API & SDK
API & SDK/2026-07-04Advanced

Reading the Claude apps gateway Announcement, I Rebuilt My Indie-Scale Control Plane

The self-hosted Claude apps gateway is a control-plane/data-plane separation you can scale down. Per-app cost attribution, model allowlists, and fail-closed spend caps, implemented as a small Cloudflare Workers proxy.

Claude API117gateway2cost management7Cloudflare Workers15operations19architecture10

Premium Article

At the start of the month, I opened my Claude API bill and stopped. I could see the total. I could not see the breakdown.

In my setup, three things shared a single API key: an automation that drafts multilingual replies to App Store reviews, the content pipeline behind my blogs, and an experimental script I had written on a whim. Which one spent what? The billing page could not tell me.

Around the same time, Anthropic announced a self-hosted Claude apps gateway for Amazon Bedrock and Google Cloud. SSO, centralized policy enforcement, role-based access, per-user cost attribution, spend limits. The vocabulary is enterprise, but the underlying problem was exactly mine on that morning.

Rather than filing the announcement under "enterprise features that don't concern me," I tried reading it as a design document. Then I scaled the idea down to indie size and built a small proxy. This is the record of that implementation and migration.

What the gateway actually centralizes

Unpacking the official description, the gateway provides four things:

  1. Centralized authorization — deciding who (which app) may call a model, at the entrance of the call path
  2. Centralized policy — enforcing which models and features are allowed on the path itself, not in each app's code
  3. Cost attribution — recording usage per user (or per app), so the bill becomes decomposable
  4. Spend limits — capping attributed cost, and refusing requests before they go through once the cap is hit

The interesting part is that every one of these depends on a single move: funneling all model calls through one path. As long as each app calls api.anthropic.com directly, none of this is possible. Once the path is unified, authorization, measurement, and policy can all ride on that one point.

Borrowing networking vocabulary, this is a separation of control plane and data plane. The app focuses on the data plane — inference in, output out — while keys, policy, and metering move to the path. The gateway, as a product, is that separation in purchasable form. That is how I read it.

What to keep and what to drop at indie scale

There is no need to import an enterprise control plane wholesale. At my scale — one person, three products — the triage looked like this.

Safe to drop: SSO and role-based access. When the only operator is me, putting human authentication on the path adds little.

Worth keeping: three things.

  • Per-app tokens — apps never see the real key; each calls with its own internal token. This becomes the unit of attribution, and if a token leaks, you revoke that app alone
  • Model allowlists — pin which models each app may use, on the path. This catches typos in model strings and expensive models left in experimental code
  • Spend caps — a monthly ceiling per app, enforced by refusing requests. As discussed below, this should be fail-closed

Here is the migration order I followed:

  1. Inventory every product using the API key (they hide in surprising places — I had forgotten one in a cron job)
  2. Deploy the proxy; the real key lives only in the proxy's secrets
  3. Issue an internal token per app and repoint each app's base URL at the proxy
  4. Only after confirming every app has switched, rotate the real key (any stragglers still calling the API directly get flushed out here)

Putting step 4 last matters. Rotate first and any app you missed dies suddenly.

Thank you for reading this far.

Continue Reading

What follows includes implementation code, benchmarks, and practical content we hope you'll find useful. This site runs without ads — server and development costs are supported entirely by members like you. If it's been helpful, we'd be truly grateful for your support.

WHAT YOU'LL LEARN
A complete minimal control-plane proxy on Cloudflare Workers and Durable Objects (per-app tokens, model allowlists, spend caps)
A real migration from three products sharing one API key to per-app cost attribution, including the forgotten high-cost config it exposed
A decision framework for choosing between a self-built proxy, LiteLLM, and the official gateway based on scale and required control granularity
Secure payment via Stripe · Cancel anytime

Unlock This Article

Get full access to the rest of this article. Buy once, read anytime. This site is ad-free — your support goes directly toward keeping it running.

or
Unlock all articles with Membership →
Share

Thank You for Reading

Claude Lab is ad-free, supported entirely by members like you. We publish practical guides daily with implementation code, benchmarks, and production-ready patterns. If you've found it useful, we'd love to have you on board.

  • Copy-paste ready implementation code
  • New advanced guides published daily
  • $5/mo or $10 for lifetime access
View Membership →

Related Articles

API & SDK2026-08-15
The Connection That Dies Mid-Thought Is Being Killed by Your Relay, Not the Upstream
Put a proxy or Worker in front of Claude Code and long thinking pauses start dying. The cause is neither the model nor the upstream — it is your relay holding the byte stream. Six relay behaviors compared side by side, plus how to verify yours before it ships.
API & SDK2026-07-11
Tightening Tool Schemas From the Arguments You See in Production
Record the arguments Claude actually passes to your tools in production, then use that distribution to add enums and patterns back into your JSON Schema. With logging code and before/after numbers.
API & SDK2026-06-24
What I Decided the Day the Ceiling Doubled: A Headroom Budget for Scheduled Jobs on One Shared API Key
Why I did not compress my intervals when the rate limit doubled, and how to design a headroom budget for running several scheduled jobs on one shared API key, with measurement and working code.
📚RECOMMENDED BOOKS
Build a Large Language Model (From Scratch)
Sebastian Raschka
LLM Dev
Prompt Engineering for LLMs
Berryman & Ziegler
Prompting
AI Engineering
Chip Huyen
AI Eng
* Contains affiliate links
See all →