Switchyard for startups building with LLMs: one endpoint, your own keys
How a small team can call Anthropic, OpenAI and OpenAI-compatible models through one endpoint with aliases, fallback, per-key limits and logs.
Early AI products tend to hard-code one model from one provider, then spend a week unpicking it when they want to try another, when the provider has an outage, or when a staging environment burns through the production budget. Switchyard sits between your app and your model providers and gives you one OpenAI-compatible endpoint. Your code asks for an alias such as fast or smart; the dashboard decides which provider and model answer.
What changes in your code
Very little. Point your OpenAI SDK at the gateway's /v1 URL and use a gateway key instead of a provider key:
const client = new OpenAI({ baseURL: 'https://YOUR-GATEWAY-HOST/v1', apiKey: process.env.GATEWAY_KEY });
const r = await client.chat.completions.create({ model: 'fast', messages: [{ role: 'user', content: 'Hello' }] });
POST /v1/chat/completions (with streaming) and GET /v1/models are supported. Requests to Anthropic are translated from the OpenAI format and back, including streams, so the same client code works for both. The API quickstart lists every supported parameter.
Why a small team benefits
- Swap models without a deploy. Change the alias target in the dashboard. Useful when you compare models on real traffic or when a model is retired.
- Survive a provider incident. An alias can have up to five targets. If the first returns a 5xx, a 429 or times out, the next answers. The response header
x-gateway-attemptstells you how many tries it took. - Keep environments apart. Create one gateway key per app or environment, cap each key's requests per minute, and revoke a leaked key without rotating provider keys.
- See usage per key and model. Monthly requests and tokens per key and model, and a log of every request you can filter and download as CSV.
Your keys, your bill
You connect your own provider accounts. Your provider bills you directly and Switchyard adds no markup on tokens. Provider keys are encrypted at rest and never shown again after you save them. The plan covers gateway requests and tokens per month:
| Free | Pro ($49/month excl. VAT) | |
|---|---|---|
| Requests per month | 1,000 | 200,000 |
| Tokens per month | 1M | 200M |
| Provider connections | 2 | 20 |
| Model aliases | 5 | 200 |
| Request log retention | 7 days | 30 days |
Only successful requests count. At the limit, requests get HTTP 402 with the code plan_request_limit or plan_token_limit until the 1st (UTC) or an upgrade; owners get an email at 80% and there is never an overage charge.
Privacy of prompts
By default the logs keep metadata only: time, key, requested model, provider, upstream model, status, attempts, latency and token counts. Prompt and response content is stored only if an admin turns content logging on, and only for new requests. That default suits products that handle customer data: you get operational visibility without copying your users' text into another system.
What it does not do yet
Be clear-eyed before you adopt it:
- Tool calls (function calling) and images are not supported yet, and neither is
ngreater than 1. - It does not cache responses or pick the cheapest model automatically; routing is the ordered list you configure.
- It is a hosted service; there is no self-hosted version.
If your product depends on tool calls today, keep those requests direct to the provider and route plain chat completions through the gateway.
A sensible first setup
- Connect two providers, for example Anthropic and OpenAI, and use Check connection on each.
- Create an alias
fastwith a small model from each provider, in your preferred order. - Create a gateway key for staging with a low requests-per-minute limit, and a separate key for production.
- Send a request and watch it appear under Logs.
Then read our fallback strategy guide before you rely on fallback in production; a fallback model that behaves differently can surprise users.
When you outgrow Free
Free is meant for building and testing: 1,000 requests and 1M tokens a month is enough to develop a feature and run a small beta. Move to Pro when real users arrive or when you need more than two provider connections. You can cancel any time from Billing and keep Pro until the end of the paid period; your aliases, keys and logs stay in place when you return to Free.
Try Switchyard free
One OpenAI-compatible endpoint in front of your own model provider keys: routing, fallback, rate limits, usage and logs. The Free plan needs no card; you can export or delete your data any time.