OpenAI (BYOK)
How to create an API key for OpenAI and add it to AnyRouter via Bring Your Own Key.
OpenAI is a supported BYOK provider. Bring your own API key string, and AnyRouter routes your requests through it — no platform credits are charged for BYOK-backed calls.
Get your API key
- Sign in to the OpenAI Platform.
- Open API keys in the left sidebar.
- Click Create new secret key, give it a name and an optional project, then Create secret key.
- Copy the key immediately — it is shown only once.
Gotchas
Project-scoped keys begin with sk-proj-...; both sk-... and sk-proj-... work. To pin requests to a specific OpenAI organization or project, set a Base URL on the AnyRouter key form or pass custom headers.
Add it to AnyRouter
- Go to Dashboard → BYOK.
- Find OpenAI under Available and click Add key.
- Paste your key into the API key field.
- Create key: OpenAI console
- Default base URL (editable on the key form):
https://api.openai.com/v1
- Click Save. AnyRouter runs a live validation call against OpenAI before storing the key — if it fails, the dialog shows the upstream error and the key isn't saved.
Related
- BYOK Provider Setup Guide — the full provider list and the general flow
- Bring Your Own Key (BYOK) — routing precedence, load balancing, and costs
- Free-tier aggregation — combine free tiers behind one preset