Tool setup

Point the Anthropic SDK at apiToken.sale

The official Anthropic SDKs let you override the base URL, so switching to apiToken.sale is a one-line change — your model IDs and message code stay exactly the same.

·

Python

from anthropic import Anthropic

client = Anthropic(
    base_url="https://api.apitoken.sale",
    api_key="sk-pool-•••",
)
msg = client.messages.create(
    model="claude-opus-4-8",
    max_tokens=1024,
    messages=[{"role": "user", "content": "Hello"}],
)

See also: Set up the Claude API in two minutes

TypeScript

import Anthropic from "@anthropic-ai/sdk";

const client = new Anthropic({
  baseURL: "https://api.apitoken.sale",
  apiKey: "sk-pool-•••",
});
const msg = await client.messages.create({
  model: "claude-opus-4-8",
  max_tokens: 1024,
  messages: [{ role: "user", content: "Hello" }],
});

Verify the switch worked

After changing the base URL, make one request and confirm you get a normal Anthropic response. Streaming, tool use and system prompts all behave exactly as with api.anthropic.com — only the billing endpoint changed.

  • A 401 means the key or base URL is wrong — re-check both.
  • Keep the same model IDs; no code around messages needs to change.
  • Read usage per request in the dashboard to confirm spend and your discount.

Frequently asked questions

Can I keep using the official Anthropic SDK?

Yes. Set base_url (Python) or baseURL (TypeScript) to apiToken.sale and everything else stays the same.

Do model IDs change?

No. Use the same model IDs such as claude-opus-4-8 and claude-sonnet-5.

Use Google or GitHub to create your key and get $10 of Claude usage before you top up.