Your application starts with just a single LLM query, which is easy enough to manage.
But now you’re getting users and need control usage to limit costs.
Then you add different pricing tiers - how do you track users’ token usage and limit access to the product?
Oh, and what if OpenAI goes down? Now you need to set up a fallback to Anthropic.
And what if people start abusing the application, how do you monitor for abuse or block their access?
And then, and then, and then…Waystone takes care of all the difficult, boring, extra stuff that you shouldn’t have to build when creating AI applications:
Routing to different models and providers for different prompts/use-cases
Start by forwarding your LLM requests through our gateway with a two-line change to your
code, then take advantage of our powerful rules engine and observability tooling (coming
soon!) to route requests, set model fallbacks, retries, and more based on which of your
users is making the request.
Copy
const client = new OpenAI({- apiKey: process.env['OPENAI_API_KEY'],+ apiKey: process.env['WAYSTONE_API_KEY'],+ baseURL: 'https://waystone.run/api/gateway/v1', }); const response = await client.responses.create({ model: 'gpt-4o', instructions: 'You are a coding assistant that talks like a pirate', input: 'Are semicolons optional in JavaScript?', });