Getting Started
This tutorial takes you through the shortest path to a working request: complete initial setup, add one upstream provider, publish a Model ID, issue a scoped API key, connect a client, and verify the result in Request history.
Prerequisites
- Installed Stravia: Download and install Stravia Desktop or start Stravia Server. See Installation & Upgrade if you have not installed it yet.
- Upstream credential: An API key or supported OAuth account for at least one upstream model provider.
Steps
Complete initial setup (Server only)
If you run Stravia Desktop, skip this step—Desktop creates a local native admin session automatically and opens directly to the console.
If you run Stravia Server, check the startup logs for the one-time
/setupURL and token, open it in your browser, select SQLite (or configure PostgreSQL + Redis first), and create your administrator account.
Add an upstream provider
Open Setup → Providers and select Add provider. Choose a built-in vendor (such as OpenAI) or an installed vendor plugin, enter your credentials, and save the connection. Stravia immediately syncs the provider's discovered models.

Create a model route and bind a target
Open Setup → Models → New model. Set a client-facing Model ID (for example
my-model), a Display name, and choose Purpose: Inference.
Scroll to the Targets section (or open the new route directly from the provider's upstream model list), bind at least one enabled upstream target in Lane 0, verify there are no thinking-mapping or purpose warnings, and save the route.

Create an API key
Open Setup → API Keys and click Create key. Give the key a descriptive name, select the model(s) it may access (such as
my-model), and optionally set an RPM limit or decimal spend limit. Copy the generated key (formatted likesk-stravia-demo-not-a-real-keyin examples) before closing the dialog.
Connect a client or send a test request
Open Setup → Connect clients. On the Clients tab, choose your tool (such as
Codex,Claude Code, orOpenCode), select your API key, and click Write configuration (Desktop) or copy the generated config snippet (Server). Alternatively, switch to the Code tab and run the generatedcURLcommand:
curl http://127.0.0.1:23471/v1/chat/completions \ -H "Content-Type: application/json" \ -H "Authorization: Bearer sk-stravia-demo-not-a-real-key" \ -d '{"model":"my-model","messages":[{"role":"user","content":"Hello, Stravia!"}]}'sh
Verify
Open Monitor → Request history (/logs). You should see a Completed interaction card matching my-model with your prompt, model response, and token usage counters.

Seeing a configuration preview or saving a client config file only confirms the patch was written—always send one request and confirm a Completed card in Request history before moving on.
Troubleshooting
- 401 Unauthorized when calling
/v1/*: Confirm the API key is enabled, has not expired, has not exceeded itsspend_limit, and allows the requestedModel ID. - Target shows a purpose or thinking warning: Check that the bound upstream model supports
Inferenceand save any generated thinking-level mappings before testing. - Server asks for a setup token again: Ensure your data directory (
~/.straviaor--data-dir) is persistent and writable across restarts.
Next
- Connect Clients — detailed rules for all 12 supported CLI/agent clients and SDK protocols.
- Models, Routing & Thinking — configure multi-provider failover lanes, timeouts, and route billing.
- Deployment Modes: Desktop vs Server — host Stravia cleanly on a workstation, container, or reverse proxy.