Skip to content
TokenGauge
Menu

Setup note · 3 steps

SayGM in Anthropic SDK

Some gateways convert every model to an OpenAI-shaped API. SayGM passes the Anthropic API through unchanged.

Updated 9 Oct 2026

§ 01

Steps

  1. Step 1: Install the anthropic package.

  2. Step 2: Construct the client with base_url set to the SayGM Anthropic endpoint and api_key set to your SayGM key.

  3. Step 3: Call messages.create with claude-opus-5, claude-sonnet-5 or claude-haiku-4.5.

Python
import osfrom anthropic import Anthropic client = Anthropic(    base_url=os.environ["SAYGM_ANTHROPIC_BASE_URL"],    api_key=os.environ["SAYGM_API_KEY"],) message = client.messages.create(    model="claude-sonnet-5",    max_tokens=1024,    messages=[{"role": "user", "content": "Write a release note for v2.1."}],)

§ 02

Why route Anthropic SDK through a gateway

  • 01

    Prompt caching works because SayGM pins a conversation to one provider.

  • 02

    Provider-specific features are not stripped by a translation layer.

  • 03

    Claude models are about 15 percent below OpenRouter in the October snapshot.

§ 03

Models worth trying in Anthropic SDK

Snapshot SayGM prices per million tokens, input then output.

§ 04

Anthropic SDK questions

Does Anthropic SDK work with SayGM?

Yes. Some gateways convert every model to an OpenAI-shaped API. SayGM passes the Anthropic API through unchanged.

Which models can I use in Anthropic SDK through SayGM?

Any model in the SayGM catalogue, including Claude Fable 5.1, Claude Opus 5.5, Claude Sonnet 5.5, Claude Opus 5 and confidential open-weight models.

Where do I find the SayGM base URL?

The endpoints for the OpenAI, Anthropic and Gemini compatible APIs are listed in the SayGM developer docs, linked from the SayGM website after sign-up.