<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: pradip</title>
    <description>The latest articles on DEV Community by pradip (@dhpradeep25).</description>
    <link>https://dev.to/dhpradeep25</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4074997%2F61f75cb4-f1dd-4c17-95ce-2bf48b5174ec.jpg</url>
      <title>DEV Community: pradip</title>
      <link>https://dev.to/dhpradeep25</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/dhpradeep25"/>
    <language>en</language>
    <item>
      <title>How I turned my Claude subscription into a multi-tenant API for my team</title>
      <dc:creator>pradip</dc:creator>
      <pubDate>Wed, 12 Aug 2026 15:10:01 +0000</pubDate>
      <link>https://dev.to/dhpradeep25/how-i-turned-my-claude-subscription-into-a-multi-tenant-api-for-my-team-4ho9</link>
      <guid>https://dev.to/dhpradeep25/how-i-turned-my-claude-subscription-into-a-multi-tenant-api-for-my-team-4ho9</guid>
      <description>&lt;p&gt;I have a Claude Max subscription and I kept running into the same problem. I wanted a couple of teammates, and a few of my own scripts, to use it. But I did not want to hand out my login, and I really did not want one person's runaway loop to burn through everyone's limits for the day.&lt;/p&gt;

&lt;p&gt;I could not find anything that solved this the way I wanted, so I built it. It is called Aegis, it is open source (Apache 2.0), and this post is a quick tour of what it does and how it works.&lt;/p&gt;

&lt;h2&gt;
  
  
  The core idea
&lt;/h2&gt;

&lt;p&gt;The &lt;a href="https://github.com/anthropics/claude-agent-sdk-python" rel="noopener noreferrer"&gt;Claude Agent SDK&lt;/a&gt; bundles the Claude Code CLI, and that CLI can run off your subscription login instead of an API key. Aegis wraps that and puts a proper multi tenant HTTP API in front of it, plus an admin dashboard to manage everything.&lt;/p&gt;

&lt;p&gt;So one subscription becomes a shared, controlled platform:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;No API key.&lt;/strong&gt; You sign in once with your Claude login and the runtime uses it for everything. Aegis strips &lt;code&gt;ANTHROPIC_API_KEY&lt;/code&gt; from the environment so it is always the subscription, never metered API billing.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Per tenant API keys.&lt;/strong&gt; Create tenants, hand out separate keys, and set each key's own rate limit and daily cost cap. Usage is tracked per key, so you can see exactly who used what.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Sessions.&lt;/strong&gt; Stateful chats, each with an isolated workspace and file upload and download, plus a live streaming chat UI.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Objectives.&lt;/strong&gt; Give it a goal and a success rubric and it loops. It does the work, a separate evaluator grades the result, and it repeats until it passes or hits a budget.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;MCP servers.&lt;/strong&gt; Register HTTP or stdio MCP servers and attach them to agents.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;OpenAI compatible endpoint.&lt;/strong&gt; A drop in POST /v1/chat/completions so existing tools and SDKs just work.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Live plan usage.&lt;/strong&gt; The dashboard shows your actual Claude plan limits, the 5 hour session window and the weekly caps, right next to your per tenant token usage.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  The stack
&lt;/h2&gt;

&lt;p&gt;FastAPI and SQLAlchemy, SQLite by default, Alembic for migrations, packaged with uv. Around 220 tests. Layered structure so it is easy to read and extend.&lt;/p&gt;

&lt;h2&gt;
  
  
  Running it
&lt;/h2&gt;

&lt;p&gt;Docker:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git clone https://github.com/dhpradeep/aegis &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="nb"&gt;cd &lt;/span&gt;aegis
&lt;span class="nb"&gt;cp&lt;/span&gt; .env.example .env
docker compose up &lt;span class="nt"&gt;-d&lt;/span&gt; &lt;span class="nt"&gt;--build&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Or locally with uv:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;uv &lt;span class="nb"&gt;sync
&lt;/span&gt;uv run claude auth login
uv run aegis
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then open the dashboard at &lt;a href="http://localhost:8000/admin" rel="noopener noreferrer"&gt;http://localhost:8000/admin&lt;/a&gt;, sign in to Claude from the System page, and mint an API key.&lt;/p&gt;

&lt;h2&gt;
  
  
  The honest caveat
&lt;/h2&gt;

&lt;p&gt;This drives Claude through a CLI logged into a personal or Team subscription, not an API key. Anthropic's terms discourage reselling or provisioning subscription access to other people, so I built and use this for personal, internal, or trusted team use of my own subscription. If you want to run it as a commercial service, you switch the runtime to API key billing, which is a config change and not a rewrite.&lt;/p&gt;

&lt;h2&gt;
  
  
  It is open source and I want help
&lt;/h2&gt;

&lt;p&gt;The repo has screenshots, a three command quick start, and a contributing guide. I would love issues, PRs, and especially a second pair of eyes on the security model.&lt;/p&gt;

&lt;p&gt;Repo: &lt;a href="https://github.com/dhpradeep/aegis" rel="noopener noreferrer"&gt;https://github.com/dhpradeep/aegis&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you try it and something breaks, tell me and I will fix it.&lt;/p&gt;

</description>
      <category>claude</category>
      <category>opensource</category>
      <category>python</category>
      <category>selfhosted</category>
    </item>
  </channel>
</rss>
