How to use your Claude Pro/Max subscription with the Agent SDK (Python + TypeScript)

Dev.to AI
Generative AI

If you pay for Claude Pro or Max and also script things against Claude from your own code, you might be double-paying. Anthropic keeps subscription billing and API credits as completely separate accounts - and the regular anthropic SDK only knows about the API one. But there's an officially-ed path that lets the Claude Agent SDK bill against your subscription instead. Here's how it works in Python and TypeScript. A small companion repo with the full setup, both languages side by side, and worked examples: 👉 github.com/avivshaked/prototype-with-claude-max Here's the mental model.