OmniRoute/examples/quickstart
Diego Rodrigues de Sa e Souza c1e30b7676
Release v3.8.51
Release v3.8.51 — 2,022 documented changes (235 features, 1,454 fixes, 333 maintenance) from 1,973 cycle commits and 301 external contributors; full changelog in CHANGELOG.md → [3.8.51]. Full ci.yml matrix green on 2f42a9ac (57 checks).
2026-09-29 19:58:13 -03:00
..
curl_terminal.sh Release v3.8.51 2026-09-29 19:58:13 -03:00
nodejs_axios.js Release v3.8.51 2026-09-29 19:58:13 -03:00
php_curl.php Release v3.8.51 2026-09-29 19:58:13 -03:00
python_requests.py Release v3.8.51 2026-09-29 19:58:13 -03:00
README.md Release v3.8.51 2026-09-29 19:58:13 -03:00

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