LOCAL QUICKSTART

Your first routed request.

Afterinstalling Axond, connect an OpenAI API key and start a local gateway.

1. Configure and run

Run these commands in a new directory. Replaceyour-provider-key with your OpenAI API key. Keep this terminal open.

mkdir -p axond-localcd axond-localcurl -fsSLo axond.toml https://axond.dev/axond.tomlexport PATH="$HOME/.local/bin:$PATH"export OPENAI_API_KEY="your-provider-key"export GW_INBOUND_PLATFORM_KEY="quickstart-platform-key"axond

The example configuration listens only on your machine and stores usage in a local SQLite file. The gateway key shown here is for local testing.

2. Set a budget

In a second terminal, set a $10 budget for the platform namespace. Axond requires a budget before forwarding requests.

curl -fsS -X PUT http://localhost:8080/api/v1/namespaces/platform/budgets/quickstart \  -H "Authorization: Bearer quickstart-platform-key" \  -H "Content-Type: application/json" \  -d '{"limit_microdollars":10000000}'

3. Make a request

Use your gateway key and namespace URL with your usual OpenAI client. This request uses your provider account and incurs provider charges.

curl -fsS http://localhost:8080/ns/platform/v1/chat/completions \  -H "Authorization: Bearer quickstart-platform-key" \  -H "Content-Type: application/json" \  -d '{"model":"openai/gpt-4o","messages":[{"role":"user","content":"Hello, Axond."}],"max_tokens":64}'

Python and TypeScript examples →

For more providers and deployment settings, see theconfiguration guide ↗.