Registers one provider credential; the engine seals the value and returns only a four-character hint.
const url = 'https://example.com/v1/m/sessions/providers';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"api_key":"example","base_url":"example","default_model":"example","display_name":"example","kind":"anthropic","service":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}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.
Authorizations
Section titled “ Authorizations ”Parameters
Section titled “ Parameters ”Header Parameters
Section titled “ Header Parameters ”Target tenant id; required when the principal can act in more than one tenant.
Request Body required
Section titled “ Request Body required ”object
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.
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.
Your own name for this credential; it is what a picker shows. Unique among active providers of the same kind, case-folded.
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.
Responses
Section titled “ Responses ”OK
object
Example generated
{}Bad request
object
Example generated
{}Unauthenticated
object
Example generated
{}Forbidden
object
Example generated
{}Not found
object
Example generated
{}Conflict / setup required
object
Example generated
{}Rate limited
object
Example generated
{}