OmniRoute Local Installation and Startup Validation
Edit pageThis page is for first-time HagiCode users who want the shortest OmniRoute setup path: start the local service, verify that http://localhost:20128/v1 works, and confirm that both the Dashboard and API are available.
Prerequisites
Section titled “Prerequisites”- Node.js is already installed. Complete Installing Node.js first if needed.
- Local port
20128is available and not already occupied. - You have at least one upstream model provider account that you plan to route through OmniRoute.
- Before integrating HagiCode, a CLI, or an SDK, keep these two addresses separate:
- Dashboard:
http://localhost:20128 - OpenAI-compatible Base URL:
http://localhost:20128/v1
- Dashboard:
Install and run locally
Section titled “Install and run locally”Start with the recommended global npm path:
npm install -g omnirouteomnirouteAfter the service starts, validate it in this order:
- Open
http://localhost:20128in a browser and confirm that the Dashboard loads. - Go to the
Endpointspage in the Dashboard and create or copy an API key. - Note the Base URL you will hand to tools later:
http://localhost:20128/v1.
Validate the running service
Section titled “Validate the running service”Validation 1: confirm the model catalog is readable
Section titled “Validation 1: confirm the model catalog is readable”Put the key from the Endpoints page into an environment variable:
export OMNIROUTE_API_KEY="replace-with-the-key-you-copied-from-the-Endpoints-page"Then request /v1/models:
curl http://localhost:20128/v1/models \ -H "Authorization: Bearer ${OMNIROUTE_API_KEY}"If you get a model list back, the OpenAI-compatible endpoint and auth flow are working.
Validation 2: send a minimal chat request
Section titled “Validation 2: send a minimal chat request”curl http://localhost:20128/v1/chat/completions \ -H "Authorization: Bearer ${OMNIROUTE_API_KEY}" \ -H "Content-Type: application/json" \ -d '{ "model": "replace-with-a-model-id-from-v1-models", "messages": [ { "role": "user", "content": "Reply with ok." } ] }'The goal here is not prompt quality. It is to prove that your chosen model can already be routed through OmniRoute successfully.