You don't need a Anthropic API key to call Claude Opus 4.7 — AIgateway provides one unified sk-aig-... key that routes to every provider. Sign in at aigateway.sh, copy the key from the dashboard, and use it with any OpenAI-compatible SDK. Direct Anthropic keys still work via BYOK for customers who prefer their own provider contract.
Instead of creating a Anthropic account, copying a separate API key, and managing a billing relationship for each provider, use one sk-aig-... key on AIgateway. It routes to Anthropic (and every other provider) on your behalf, with usage aggregated on a single invoice.
Sign in at aigateway.sh/signin, open the dashboard, click "New key". Keys are sk-aig-... format, scoped by default to the account, and can be rotated or revoked instantly. Production teams typically mint per-environment keys (dev, staging, prod) or per-user sub-account keys via the /v1/accounts API.
AIgateway supports bring-your-own-keys on Enterprise. You paste your Anthropic key into the dashboard; AIgateway proxies requests using your contract's pricing but still handles routing, evals, replays, and audit logging. Useful when you have committed spend with a provider you want to burn down.
# pip install aigateway-py openai
# aigateway-py: sub-accounts, evals, replays, jobs, webhook verify.
# openai SDK: chat/embeddings/images/audio — drop-in compat per our SDK's own guidance.
from openai import OpenAI
client = OpenAI(
base_url="https://api.aigateway.sh/v1",
api_key="sk-aig-...",
)
r = client.chat.completions.create(
model="anthropic/claude-opus-4.7",
messages=[{"role": "user", "content": "Explain vector databases in two sentences."}],
)
print(r.choices[0].message.content)// npm i aigateway-js openai
// aigateway-js: sub-accounts, evals, replays, jobs, webhook verify.
// openai SDK: chat/embeddings/images/audio — drop-in compat.
import OpenAI from "openai";
const client = new OpenAI({
baseURL: "https://api.aigateway.sh/v1",
apiKey: process.env.AIGATEWAY_KEY,
});
const r = await client.chat.completions.create({
model: "anthropic/claude-opus-4.7",
messages: [{ role: "user", content: "Explain vector databases in two sentences." }],
});
console.log(r.choices[0].message.content);Yes. Instantiate OpenAI(base_url="https://api.aigateway.sh/v1", api_key="sk-aig-..."). Zero client-side code changes beyond base_url.
Yes. Mint one per environment (dev/staging/prod) or one per end-user via the sub-account API. Each key is independently rotatable and revocable; usage is aggregated or split per your preference.
Revoke the compromised key in the dashboard (it stops authenticating instantly) and issue a new one. Because keys are opaque strings, there's no re-signing or cert rotation overhead.
Yes — the same key routes to every model Anthropic publishes, plus 100+ models across other labs. Pricing is per-model (published in /v1/models); the key is universal.