SpiderGate API Reference
SpiderGate is SpiderIQ's OpenAI-compatible LLM gateway β one endpoint in front of 100+ models across 18 providers. Send a request to a task alias like spideriq/fast and SpiderGate routes it to the best available model, falls back automatically on failure, caps your spend, and hands back the real per-call cost.
Base URL β
https://spideriq.ai/api/gate/v1Protocol β OpenAI Chat Completions, drop-in. Point any OpenAI SDK at the base URL above.
Auth β a Bearer API key (see Authentication).
Current version β
2.70.0
Why a gateway
You send model: "spideriq/coding" instead of a specific provider model. SpiderGate:
Routes to the best model in that alias's chain,
Falls back to the next provider if one is down or rate-limited,
Caps cost per request (
spidergate_options.max_cost_usd),Caches identical prompts, and
Reports the real dollar cost of every call in
spidergate_metadata.cost_usd.
One key replaces juggling OpenRouter + Groq + Mistral + Cerebras credentials.
Your first request
curl https://spideriq.ai/api/gate/v1/chat/completions \
-H "Authorization: Bearer $SPIDERGATE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "spideriq/fast",
"messages": [
{ "role": "user", "content": "In one sentence, what is an LLM gateway?" }
],
"max_tokens": 60
}'Response (real call, served by nvidia_nim/meta/llama-3.1-8b-instruct in ~327 ms):
{
"id": "chatcmpl-721027d3a2444b09a1769d21",
"object": "chat.completion",
"created": 1784494387,
"model": "nvidia_nim/meta/llama-3.1-8b-instruct",
"choices": [
{
"index": 0,
"finish_reason": "stop",
"message": {
"role": "assistant",
"content": "An LLM (Large Language Model) gateway is a software interface that enables other applications or services to access and utilize the capabilities of a large language model, such as natural language processing and generation, in a secure and scalable manner."
}
}
],
"usage": { "prompt_tokens": 52, "completion_tokens": 47, "total_tokens": 99 }
}You never named a provider β spideriq/fast picked the model.
Where to next
I want to⦠| Go to |
|---|---|
Authenticate my requests | |
See every parameter + send a completion | |
Pick the right task alias | |
List available models & aliases | |
Handle errors correctly |