Merge your free Groq, Gemini and Mistral keys behind a single OpenAI-compatible endpoint. When one is rate-limited, the next one answers — your app never sees a 429.
const client = new OpenAI({ baseURL: "https://fourtwonine.dev/v1", apiKey: "sk-429-…", defaultHeaders: { "X-Provider-Chain": JSON.stringify([ { label: "groq-personal", provider: "groq", key: KEY_GROQ }, { label: "gemini-free", provider: "gemini", key: KEY_GEMINI }, ]), // follow the dashboard priority order }, });
Register your free-tier keys once, set a priority order, and call one endpoint from your app forever after.
Rate-limited or down? The next slot in your list picks up the request, transparently. No retry logic in your code, ever.
Your provider keys travel with each request and are used once. We persist only a one-way hash — enough to notice a rotation, useless to an attacker.
A slot on fourtwonine is just a name — groq-personal, not a key. The real key lives in your code, rides along with every request, gets used for that one call, and is gone. What stays behind is a one-way hash that can only answer one question: "did you rotate this key?"