LLM API
Unified interface for calling large language models across multiple providers through a single endpoint.
What It Does
The LLM API abstracts provider differences so you can switch between OpenAI, Anthropic, Google, Grok, and OpenRouter without changing your code. One endpoint, one format, any model.
Key Capabilities
| Capability | Description |
|---|---|
| Multi-Provider | OpenAI, Anthropic, Google, Grok, OpenRouter — all through one API |
| Auto-Routing | Set model: "auto" and let the system pick the best model for your task |
| Structured Output | Force JSON responses with schema validation |
| Multimodal | Send images alongside text — auto-converted to each provider's native format |
| Streaming | Real-time token-by-token responses via SSE |
| Global Cache | Automatic response caching for up to 40% cost reduction |
Quick Example
curl -X POST https://llm.zihin.ai/api/v3/llm/public/call \
-H "X-Api-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"query": "Summarize this contract", "model": "auto"}'
Endpoints
| Endpoint | Auth | Description |
|---|---|---|
POST /api/v3/llm/public/call | API Key | LLM call (external integrations) |
POST /api/v3/llm/call | JWT | LLM call (multi-tenant frontend) |
GET /api/v3/llm/models | Public | List available models |
POST /api/v3/llm/test-connection | JWT | Test provider connectivity |
Next Steps
- Making Calls — Request/response format, structured output, multimodal
- Models & Providers — Available models and pricing tiers
- Auto-Routing — How intelligent model selection works
- Streaming — Real-time SSE streaming