Never stop coding. Free MIT AI gateway: one endpoint, 375 providers (150+ free), 1,400+ models Kimi, Claude, GPT, Gemini, GLM, DeepSeek, MiniMax. Works with Claude Code, Codex, Cursor, OpenCode, Cline & Copilot. Quota-aware auto-fallback, RTK+Caveman compression saves 15-95% tokens, MCP/A2A, Desktop/PWA. Built by 900+ contributors
TypeScript a2aai-agentsai-gatewayanthropicclaudeclaude-codeclinecodexcopilotcursordeepseekfree-aigeminikimillm-gatewaymcpopenaiopenai-proxyqwentoken-saver
Quickstart Code Examples
Simple, copy-paste scripts to get your first response from a local OmniRoute server in under a minute.
Prerequisites
Start OmniRoute locally first:
npx omniroute
# Server is now live at http://localhost:20128/v1
Examples
| File | Language | Dependency |
|---|---|---|
python_requests.py |
Python | pip install requests |
nodejs_axios.js |
Node.js | npm install axios |
curl_terminal.sh |
Bash / cURL | curl (pre-installed on Mac/Linux) |
php_curl.php |
PHP | PHP 7.4+ with cURL |
All examples use auto — the zero-configuration router that works immediately with no provider sign-up required.
Key Settings (same in all examples)
| Setting | Value | Why |
|---|---|---|
model |
auto |
Zero-configuration routing, works out of the box |
stream |
false |
Returns standard JSON instead of SSE stream |
Authorization |
Bearer dummy-key |
Any non-empty string satisfies the header requirement |
What to Change
To use a specific model, replace auto with any model ID from:
curl http://localhost:20128/v1/models