Credentials. The script needs your Omni Route key, so keep it in an environment variable and out of shared code.
Who it is forA developer or analyst writing a script or small app that calls AI models and wants to test several providers without rewriting the client.
The problemEvery provider has a different SDK, base URL and key handling, so trying a new model means new integration work.
The outcomeA single chat completion request to localhost returns a model answer, and the model can be changed in one field.
What you need first
- Node.js/npm or Docker to run OmniRoute (both are listed in the README)
- Accounts with the AI providers you want to connect, plus their credentials where required
- A terminal and a browser to open the local dashboard
Steps
- Install Omni Route with npm (
npm install -g omniroute) or pull the Docker imagediegosouzapw/omniroute. (inferred, check the README) - Connect a provider in the dashboard and copy your Omni Route key from Dashboard → Endpoints.
- Run the test request:
curl http://localhost:20128/v1/chat/completions -H "Authorization: Bearer YOUR_OMNIROUTE_KEY" -H "Content-Type: application/json" -d '{"model":"auto","messages":[{"role":"user","content":"Hello!"}]}'(inferred, check the README) - Open examples/quickstart/ in the repo and pick the Python or Node.js script for your project.
- Replace the model value with a specific model ID from your connected providers when you want a fixed model.
Prompt for your agent
Using the diegosouzapw/OmniRoute repo, write a script that sends the prompt <prompt> to http://localhost:20128/v1/chat/completions with model auto and prints the reply. Run it and report the reply text. Verify that the HTTP status is 200 and the reply is non-empty.
Caveat. The README says a fresh installation can have no eligible keyless targets, so the first request may fail until a provider is connected.
Use this in your AI agent
Ask your agent
Using the Deduped MCP, get the setup steps for diegosouzapw/OmniRoute and "Send one API call to many models from a script"
Add Deduped to Claude Code once
claude mcp add --transport http deduped https://dedupedai.com/mcp
Every Monday: the 5 hottest repos and exactly how to use them. Free, one email a week, unsubscribe anytime.
Get them freeShare: X LinkedIn Hacker News Email Copy link
Third-party repos we don't own. AI-written use cases can be wrong. Disclaimer