Skip to Content
FrameworksClaude Agent SDK + Curate-Me

Claude Agent SDK

The Anthropic Python SDK accepts a base_url argument that points the client at the Curate-Me gateway’s Anthropic-compatible surface (/v1/anthropic). The wire format is unchanged.

Minimal example

import os, anthropic client = anthropic.Anthropic( base_url=f"{os.environ.get('CURATE_ME_GATEWAY_URL', 'https://api.curate-me.ai')}/v1/anthropic", api_key=os.environ["CM_API_KEY"], default_headers={"X-CM-API-Key": os.environ["CM_API_KEY"]}, ) msg = client.messages.create( model="claude-sonnet-4-20250514", max_tokens=200, messages=[{"role": "user", "content": "Summarize Curate-Me in 2 sentences."}], ) print(msg.content[0].text)

Full example at examples/integrations/claude-agent-sdk/basic_agent.py.

Supported versions

LibraryTested range
anthropic>=0.40.0,<1.0.0

Known limitations

  • Extended thinking: the thinking parameter passes through the gateway unmodified. The reasoning token cap (stage 1.7 of the governance chain) is applied based on your tier’s MAX_THINKING_TOKENS setting.
  • Tools: Anthropic’s native tool format (tools parameter on messages.create) passes through. Tool execution happens in your process — the gateway sees only the LLM call.
  • Vision / multimodal: image inputs work. Token costs include vision-token surcharge from Anthropic’s pricing.
  • Stream responses: SSE chunks pass through unmodified. The cost-record event finalizes when the stream closes.