Token Routing & Inference
Ask SpiderGate for a job instead of a model. 32 task aliases resolve to ranked fallback chains, 91 slots deep in total, reordered by provider health at request time.
Ask for the job, not the model
Stop writing a vendor's model id into your source. Send the name of the work instead and the gateway decides what serves it, so the model behind a call can change without the caller knowing. It is the same indirection as a DNS name in front of an IP, and it buys the same thing.
// Hardcoded: the provider's product decision, in your source
const response = await openai.chat.completions.create({
model: "llama-3.1-8b-instant", // breaks when it is retired
messages: [...]
});
// SpiderGate: name the job, same OpenAI client
const spidergate = new OpenAI({
baseURL: "https://spideriq.ai/api/gate/v1",
apiKey: "<client_id>:<api_key>:<api_secret>"
});
const response = await spidergate.chat.completions.create({
model: "spideriq/coding", // a job, not a model
messages: [...]
});
An alias is a chain, not a model
An alias resolves to a ranked list, not a single model. 32 aliases carry 91 ordered slots between them, an average of 2.8 deep. When the first choice rate limits or errors, the next slot answers, and the response carries an X-SpiderGate-Fallback-From header naming the first choice so you can see it in your own logs.
Health reorders the chain
Models on healthy providers move to the front and struggling ones move to the back. Nothing is dropped, so a provider having a bad ten minutes recovers on its own.
Cross-alias fallback
If a whole chain is exhausted the request falls through to its family's general alias rather than failing outright.
One URL in front of the catalog
The chains route across Cerebras, Groq, Mistral, MiniMax, NVIDIA NIM, OpenRouter and Codex today. Behind them sits a catalog of 1,216 models, 61 of which are key-backed right now. The routing engine is BerriAI's litellm.Router; what SpiderGate adds is the task alias, per-tenant auth and a usage record for every call.
One credential
You hold a single SpiderGate token. The provider keys, the pooling and the rotation stay on our side of the line.
Read the live chains
GET /api/gate/v1/aliases needs no auth and returns every alias, its chain in priority order and its 30-day usage. Hardcode against that, not against a docs page.