Skip to main content
POST
Create a named LLM config owned by the caller, optionally storing the

Body

application/json
name
string
required
provider
string
required
api_key_secret_name
string | null

Name of the caller's user_secrets row holding the provider API key. None ⇒ the platform-key path.

fallback_models
string[]
is_default
boolean

Mark this as the caller's default (clears any prior default).

max_tokens
integer<int64> | null
model
string | null
pinned
boolean
pinned_model
string | null
secret_value
string | null

Plaintext key to store under api_key_secret_name when no such secret exists yet. Required when the named secret is absent; ignored (as an upsert) when it already exists.

temperature
number<double> | null
tier1_model
string | null

Per-config tier→model overrides. When set, the smart router uses these instead of the global model_registry for this config's provider.

tier2_model
string | null
tier3_model
string | null

Response

data is the created config object (id, name, provider, model, fallback_models, temperature, max_tokens, api_key_secret_name, pinned, pinned_model, tier1_model, tier2_model, tier3_model, is_default, created_at, updated_at)

Doc-only schema for the standard MCP ApiResponse envelope ({"data": …, "status_code": N, "message": "…"}). Most /api/mcp/* payloads are service-layer serde_json::Value views, so data is documented as a free-form object; each route's response description says what it carries.

data
object | null
required
message
string
required
status_code
integer<int32>
required
Required range: x >= 0
Example:

200