Skip to main content
See Models for what each option means.

models/list and models/credentials

models/list returns every model you can use. models/credentials returns your connected providers, without their keys. Neither takes input.

models/connect

POST /rpc/models/connect connects a provider with an API key or a server address.
string
required
The provider id.
string | null
required
An existing connection to update, or null to add a new one.
string
The key.
string
For an OpenAI-compatible server.
string
A name for this connection.
string
The model to use.
boolean
default:"true"
Make this the main model.
Send keys only over HTTPS, and never log request bodies that contain them.

Subscription sign-in

Signing in with a Claude or ChatGPT subscription takes several calls:
  1. models/beginOAuth with the provider and credentialId: null. Set codePage: true when you cannot receive a redirect; the provider then shows a code. Returns a loginId and where to send the person.
  2. If the provider showed a code, models/submitOAuthCode with the loginId and code.
  3. Poll models/completeOAuth with the loginId until status is ready (or error).
  4. models/finishOAuth with the loginId saves the connection.
models/cancelOAuth abandons a sign-in.

Choosing models

To give one bot its own model, use bots/update with modelProvider and modelId.