Skip to main content
POST
Connect a model provider

Authorizations

Authorization
string
header
required

A gbr_pat_ access token. Scopes are recorded on the token when it is minted.

Headers

Idempotency-Key
string

Retrying with the same key replays the first answer instead of acting again.

Maximum string length: 255

Body

application/json
key
string
required

The provider key. Verified against the provider before it is stored, and returned nowhere afterwards.

provider
string

Which vendor issued the key. Only needed when the prefix does not say: several vendors issue keys starting with sk-, and we ask rather than send your secret to vendors you never named.

model
string

Omit to accept the connector's default.

base_url
string

For custom, and for self-hosted or proxied endpoints.

label
string

A name for the Console's list. Defaults to the provider's.

default
boolean

Whether sessions naming no credential get this one. The first connection is always the default. Must be a boolean — a string is refused rather than read as false, because this decides whose bill every future turn lands on.

Response

Connect a model provider with one of your own keys.

object
string
required

Always model_credential. Names the shape, so a value can be identified without knowing which call returned it.

Allowed value: "model_credential"
id
string
required

Pass as agent.model_credential_id.

model
string
required

agent.model must match this.

label
string

Yours, from the Console. For recognising the connection.

connector
string

Which provider integration it uses.

is_default
boolean

Whether a session that names no credential gets this one.

last4
string

The last four characters of the key. On create only; the key itself is never returned.

verified
boolean

Whether the provider accepted a probe before this was stored.