Skip to main content

OmniRoute

OmniRoute is an open-source AI proxy and router. Use Sign in with Openference to route chat completions through api.openference.com with your Openference account and plan.

OAuth client

OmniRoute uses PKCE with a loopback redirect (http://127.0.0.1:<port>/callback or http://localhost:<port>/callback). The omniroute client is first-party: after the first approval, consent is remembered. Access tokens are ES256 JWTs (1 hour TTL). Refresh tokens use the oar_* prefix and rotate on every use — reuse revokes the whole family.

Account and plan requirements

  • You need an Openference user account. If you sign in with Google/GitHub and have never registered, create an account from the authorize or device page.
  • OAuth JWTs authenticate API requests. Users without an active plan may receive 402 on inference endpoints (/v1/chat/completions, etc.) even when auth succeeds.

Device flow (headless / VPS)

When loopback PKCE is not available (remote OmniRoute install), the omniroute client also supports RFC 8628 device authorization:
  1. POST https://openference.com/oauth/device with client_id=omniroute and scope openid profile email model:invoke offline_access
  2. Open verification_uri_complete in a browser (or visit /app/oauth/device and enter the user code)
  3. Sign in or create an account, then approve
  4. Poll POST /oauth/token with grant_type=urn:ietf:params:oauth:grant-type:device_code

Manual smoke (after deploy)

Expect 200 with an active plan, or 402 without one — not 401 if the JWT is valid.

API key alternative

You can also add Openference as a custom OpenAI-compatible provider with an API key from the dashboard. OAuth is recommended for dashboard installs that support browser sign-in and automatic token refresh.