1
Write a config file
Create Every option is described in Configure Routers. The model ids are in Models.
dari-gateway.yaml in the directory you will start the gateway from. This serves Claude Sonnet and GPT-6.2 Sol through the default router:2
Set your keys
Generate a gateway key for your clients, then set the provider keys you have. Provider keys are optional if you will serve from subscriptions instead.
DARI_GATEWAY_KEYS takes a comma-separated list, so you can add a second key later to rotate without downtime. For this quickstart, reuse the first key:3
Start the gateway
- Bun
- Docker
The gateway needs Bun 1.3 or later:It reads
dari-gateway.yaml from the current directory and listens on 127.0.0.1:8080.4
Check it is up
The health route needs no key:
5
Send a request
dari/routing lets the router choose the model. The response includes the model it picked in the X-Dari-Selected-Model header.Next Steps
- Connect a subscription to serve from a Claude Code or ChatGPT plan instead of, or alongside, API keys.
- Launch a coding agent against the gateway.
- Review the HTTP API for the full set of routes, headers, and errors.