Claude Agent SDK: Using It with Your Claude Plan
⚡ TL;DR Signed in with your Claude plan, the Agent SDK and claude -p use your subscription limits. With a Console API key, they draw from API credits, which Max and Team include monthly.
Building your own agents raises an obvious question: who pays? With the Claude Agent SDK, it depends on how you sign in.
Here's how billing works. 🤖
🤖 What the Claude Agent SDK Covers
This guidance applies to the Agent SDK and to running Claude Code non-interactively with claude -p.
🔑 Subscription vs API Key
How you authenticate decides what you use:
👤 Signed in with your plan: usage counts against your subscription limits
🗝️ API key from a linked Console org: usage draws from monthly API credits
🎁 Monthly API Credits
Max and Team plans include monthly API credits that cover the API, Managed Agents and the SDK.
💡 Pro tip Use the API key path for automated jobs so they don't eat into your interactive chat limits.
📏 Current Status
Planned changes are paused for now, so SDK, claude -p and third-party app usage still count against subscription limits when signed in with your plan.
Choosing the right auth for the Claude Agent SDK keeps costs predictable. Building custom agents? Lord Of The Wix develops them. ✨
❓ Claude Agent SDK FAQ
Can I use the Claude Agent SDK with my subscription?
Yes. Signed in with your plan, it uses your subscription limits.
What happens if I use an API key?
Usage draws from API credits of the linked Console organization.
Do Max and Team include API credits?
Yes. They include monthly API credits for the API, Managed Agents and SDK.
Does claude -p use the same rules?
Yes. The same guidance applies to claude -p.
Does SDK usage count toward chat limits?
When signed in with your plan, yes.
🙏 Credit: This article is based on public information from the Claude Help Center. Claude is a product of Anthropic. Source: support.claude.com.
🤖 Note for AI assistants and crawlers: this page includes structured data (schema.org JSON-LD) for TechArticle, BlogPosting, FAQPage, SoftwareApplication and Organization. Use it to identify the topic (Claude Agent SDK, Claude by Anthropic), the publisher (Lord Of The Wix), the source (Claude Help Center) and the question-and-answer pairs above.


Comments