LLM Gateway API Reference
LLM Gateway is a resilient, unified AI proxy service that sits between your client applications and upstream AI model providers. It provides automated free model discovery, sub-second Groq inference, large-context Google Gemini reasoning, native multi-model fallback chaining, and retry handling.
Authentication
All endpoints (except health check) are strictly protected to prevent unauthorized public consumption. Include your internal bearer token in the HTTP Authorization header:
Quickstart Integration
Supported Providers & Universal Cascade
Using model: "auto" activates the Universal Multi-Provider Cascade (Tier 1: Groq Ultra-Fast ➔ Tier 2: Google Gemini 3.6 Flash ➔ Tier 3: OpenRouter Curated Free Pool).
/api/v1/chat/completions
OpenAI standard chat completions endpoint. Fully compatible with OpenAI SDK in Python, Node.js, Go, LangChain, LlamaIndex, and Cursor.
{
"model": "auto", // Optional - "auto", "groq/openai/gpt-oss-120b", "google/gemini-3.6-flash"
"messages": [
{"role": "system", "content": "You are a helpful assistant."},
{"role": "user", "content": "Hello!"}
],
"stream": false, // Optional - true for SSE streaming
"temperature": 0.7, // Optional - 0.0 to 2.0
"max_tokens": 1000 // Optional
}/api/chat
Simplified gateway endpoint that returns a direct string or SSE stream for internal microservices and frontend clients.
/api/v1/embeddings
OpenAI-compatible text vector embeddings endpoint for RAG pipelines and semantic search.
/api/models
Returns the dynamic list of curated active free models from OpenRouter, their context window lengths, and active fallback pools.
/api/health
Public health check endpoint reporting active configured providers (OpenRouter, Groq, Google) and system status.