Providers (BYOK)
BYOK means "bring your own key". You connect your own account at an AI company (a provider, like OpenAI) to NuRoute. Then:
- Requests that name a model of that provider run on your key.
- The provider bills you for them, and NuRoute charges nothing (pricing).
- Your key is used before NuRoute's key for that provider.
- Artemis (
autoand the Artemis options) always runs on NuRoute's keys, whichever model it picks.
The dashboard's Provider keys page is available on request. The SDK and /v1/providers work for every organization.
Connect a provider
await client.providers.add({
provider: 'openai',
apiKey: 'sk-...',
});
You do not need to list models. NuRoute finds them by calling the provider's own /models list with your key.
For example, the key is wrong or the provider cannot be reached. The provider is still saved, but starts with no models. Fix the key, then run client.providers.test() again to retry.
The API itself accepts a base_url for self-hosted or custom-address providers. The JavaScript SDK's client.providers.add() does not offer it yet. Until it does, add these with a direct request: POST /v1/providers with { provider, base_url, api_key? }.
Manage your providers
const { configs } = await client.providers.list();
// each entry: { id, provider, enabled, enabledModels, createdAt, updatedAt }
await client.providers.enable('openai');
await client.providers.disable('openai');
await client.providers.delete('openai');
const result = await client.providers.test('openai');
// { healthy: boolean, latencyMs: number, error?: string }
| Call | What it does |
|---|---|
list() | Shows the providers you connected |
enable() / disable() | Switches a provider on or off |
delete() | Removes the provider |
test() | Checks that it works and how fast it answers |
Disable or delete? Disabling keeps your stored key but takes the provider out of routing. That is handy for pulling a provider out for a while without losing its discovered model list.
Your key or NuRoute's key?
If you connect your own key for a provider, your key wins for that provider. Every request that names one of its models uses your credentials. Every other provider keeps using NuRoute's keys.
There is nothing to switch. It happens on its own, based on which providers you have connected.
See what is available
client.models.list() returns a fixed reference list of commonly supported model ids. It does not reflect the providers you connected.
For the live catalogue, with your own keys included, call GET /v1/models/catalog directly. The model catalogue lists every model you can name.