Skip to main content
This takes a few minutes: write a config, start the gateway, and send one request through it.
1

Write a config file

Create 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:
Every option is described in Configure Routers. The model ids are in Models.
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

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.
At startup the gateway checks each provider key with its provider. If a provider rejects a key, the gateway refuses to start and names the provider. See Provider Keys.
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