Providers & config API

Overview

MultiRoute uses configs to define which providers and models are available for a given API key. The Providers page in the app is the main place to view and edit this: you see the default configuration and can create your own override (a config with parent_id set to the default). The config API (/v1/configs) lets you do the same things programmatically.

Key ideas:

See Providers and overrides for the full behavior of the Providers page and inheritance.

Providers page (app)

In the dashboard, open Providers in the sidebar:

You cannot delete providers that come from the default; you can only disable them (stored as an override with disabled: true in your config).

Config API summary

Typical operations:

Method Path Description
GET /v1/configs List config summaries for the current user. Use ?all=true to include configs with a parent.
GET /v1/configs/{config_id} Get a config by ID. Returns the effective (merged) config when the config has a parent.
POST /v1/configs Create a config. Send parent_id to create an override of the default.
PUT /v1/configs/{config_id} Replace a config (full body).
PATCH /v1/configs/{config_id} Partially update a config (name, parent_id, or providers).
DELETE /v1/configs/{config_id} Delete a config (only your own).

Provider-level operations:

Method Path Description
GET /v1/configs/{config_id}/providers List providers for that config (raw, not merged).
GET /v1/configs/{config_id}/providers/{provider_name} Get one provider.
POST /v1/configs/{config_id}/providers Add a provider.
PATCH /v1/configs/{config_id}/providers/{provider_name} Update a provider (e.g. api_key, models, api_base, disabled).
DELETE /v1/configs/{config_id}/providers/{provider_name} Remove a provider (only for providers you added, not from parent).

Authentication: use a JWT access token (or an API key with sufficient scope). See Authentication.

Response shape (effective config)

GET /v1/configs/{config_id} returns the merged config when the config has a parent. Each provider in the response may include:

Best practices