Skip to content

Registers one provider credential; the engine seals the value and returns only a four-character hint.

POST
/v1/m/sessions/providers
curl --request POST \
--url https://example.com/v1/m/sessions/providers \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "api_key": "example", "base_url": "example", "default_model": "example", "display_name": "example", "kind": "anthropic", "service": "example" }'

Registers one provider credential; the engine seals the value and returns only a four-character hint.

X-Olivares-Tenant
string format: uuid

Target tenant id; required when the principal can act in more than one tenant.

Media type application/json
object
api_key
required

The credential. Sealed at rest by the engine and never returned by any read, including immediately after this write. Lose it and rotate; there is no read that recovers it.

string
>= 8 characters
base_url
Any of:

Absolute https endpoint override, or plain http at a loopback or private-network address for anthropic, xai and openai_compatible. Empty uses the provider’s official endpoint; REQUIRED for openai_compatible. A URL carrying userinfo is refused: a credential must not travel in a field that is published in every read.

string
default_model
Any of:

Model for fresh bound sessions unless another model is selected. Omission awaits the first usable successful connection test; an empty string clears the saved default and disables automatic selection.

string
display_name
required

Your own name for this credential; it is what a picker shows. Unique among active providers of the same kind, case-folded.

string
>= 1 characters
kind
required

What the credential IS, independent of which CLI reads it. The set is closed because a kind decides which environment variables a launched child receives.

string
Allowed values: anthropic openai xai gemini openai_compatible
service
Any of:

Optional immutable API service identifier. Empty/null keeps the provider’s normal endpoint and discovery; deepseek requires openai_compatible and its documented endpoint.

string

OK

Media type application/json
object
Example generated
{}

Bad request

Media type application/json
object
Example generated
{}

Unauthenticated

Media type application/json
object
Example generated
{}

Forbidden

Media type application/json
object
Example generated
{}

Not found

Media type application/json
object
Example generated
{}

Conflict / setup required

Media type application/json
object
Example generated
{}

Rate limited

Media type application/json
object
Example generated
{}