Drop-in for the code you have
Point the OpenAI or Anthropic SDK at the gateway and swap the key. Streaming, tool calls, JSON output, images and PDFs work as they did.
Anthropic · OpenAI · xAI — one endpoint
A1 API Gateway sits between your software and the model vendors. Issue a virtual key for each app, teammate or customer, lock it to IP addresses, rate limits and a hard spending cap, and see what every request costs.
from openai import OpenAI
client = OpenAI(
base_url="https://api.a1apigateway.com/v1",
api_key="sk-gw-…", # a virtual key
)
reply = client.chat.completions.create(
model="anthropic/claude-sonnet-5",
messages=[{"role": "user", "content": "Hello"}],
)
Hand one Anthropic or OpenAI key to every app and a single leak exposes the whole account: no spending limit, no idea who used what, and rotating it breaks everyone at once.
A leaked or looping key keeps billing until someone notices.
The vendor invoice shows one total, not which app or customer ran it up.
Replacing a shared key means redeploying everything that uses it.
Guard rails
Each virtual key carries its own rules. A request that would break one is refused at the gateway, so it never reaches Anthropic, OpenAI or xAI and never costs anything.
sk-gw-4k2p…9xqMetering, routing, isolation and reconciliation in one place, so each team and customer gets exactly the access you intend.
Point the OpenAI or Anthropic SDK at the gateway and swap the key. Streaming, tool calls, JSON output, images and PDFs work as they did.
Each call is priced in US dollars and attributed to a key, a model and a vendor key, so you can see exactly where the money goes.
Bring your own Anthropic, OpenAI or xAI keys and be billed by them directly, or run on prepaid credit that can never go negative.
Every organisation gets its own console on its own subdomain and its own database file. There is no shared table to leak across.
Gateway figures are checked against Anthropic's and OpenAI's own usage reports daily, and differences are flagged.
Owners, admins and viewers, mandatory two-factor sign-in, alerts by email or signed webhook, and an audit log of every change.
You get a private console at your-name.a1apigateway.com, protected by two-factor sign-in.
Add your own vendor keys, which are tested and encrypted before they are stored, or arrange prepaid credit with us.
Create a key per app, set its limits, and point your SDK at https://api.a1apigateway.com.
Claude, GPT and Grok through one OpenAI-compatible endpoint, with Anthropic's own Messages API for teams that want it. Organisations choose which models are switched on, and aliases let you change a model without a deploy.
Tell us which vendors you use and roughly how much, and we will put together a quote.