Skip to main content
POST
Start a ChatGPT sign-in
Takes a managing key (oc_key_...) or a signed-in session. See LLMs for LLM keys in a vault. Asks OpenAI for a device code. Show the person the code and the link; then poll the sign-in until it is no longer pending. The item lands in the vault named here.
Availability: OneCLI Cloud only. A self-hosted deployment does not serve this endpoint and answers 404 with error.code: "not_found".

Authorizations

Authorization
string
header
required

A managing key (oc_key_...), an older API key (oc_...), or a signed-in session.

Headers

Idempotency-Key
string

Optional. 1 to 255 visible characters. A retry with the same key, path and body returns the first answer (with Idempotent-Replayed: true) for 24 hours. The same key with another path or body is 422 idempotency_conflict.

Required string length: 1 - 255

Body

application/json
vaultId
string
required

The vault the item goes in.

Required string length: 1 - 64

Response

The code to show, and the sign-in to poll.

expiresAt
string
required

ISO 8601. After this the sign-in answers expired.

id
string
required

The sign-in to poll.

interval
integer
required

How many seconds to wait between polls. At least 5.

url
string
required

Where to type it.

userCode
string
required

The short code the person types on OpenAI's page.