Back to feed
Dev.to
Dev.to
5/10/2026
Claude Agent SDK now bills

Claude Agent SDK now bills

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

Short summary

The Claude Agent SDK (Python and TypeScript) can bill against your Pro/Max subscription instead of API credits—just use an OAuth token from `claude setup-token` instead of API keys. Setup takes ~5 minutes: generate the token, export CLAUDE_CODE_OAUTH_TOKEN, and use it with the SDK. Includes worked examples and a reference repo showing both languages, plus auth precedence rules to avoid accidentally double-billing.

  • Agent SDK can bill to Claude Pro/Max subscription via OAuth token, avoiding double-billing with API credits
  • Setup takes 5 minutes: run `claude setup-token`, export CLAUDE_CODE_OAUTH_TOKEN variable, then use with SDK
  • Tutorial includes Python and TypeScript examples, GitHub reference repo, and auth precedence rules

Generated with AI, which can make mistakes.

Is this a good recommendation for you?

Comments

Failed to load comments. Please try again.

Explore more