Skip to main content
POST
Finish a Claude sign-in
Takes a managing key (oc_key_...) or a signed-in session. See LLMs for LLM keys in a vault. Exchanges the code Claude showed for tokens and adds the account to the vault as an llm_key item. The answer never carries a token.
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
code
string
required

What Claude showed: code#state, or the code alone.

Required string length: 1 - 4096
state
string
required
Required string length: 1 - 4096

Response

The new item.

allowPlainHttp
boolean
required

The gateway may send this item over plain http://. Off unless a person turns it on.

createdAt
string
required

ISO 8601.

deletedAt
string | null
required

ISO 8601. When it was deleted. null: a live item. A deleted item is listed only with deleted=true.

enabled
boolean
required

Off: the gateway does not use the item for any agent, whatever its permissions say. Requests to its hosts go out with no credential.

hosts
string[]
required

The hosts the gateway uses this item for.

id
string
required
kind
enum<string>
required
Available options:
app,
api_key,
llm_key
lastUsedAt
string | null
required

ISO 8601. When the gateway last used it for a request, to the hour. null: never used.

name
string
required
permissionSummary
object
required
purgeAt
string | null
required

ISO 8601. When a deleted item is destroyed for good, unless restored first. null: a live item.

rotatedAt
string
required

ISO 8601. When the value was last set: made, given a new value, or refreshed by the gateway.

service
string | null
required

The app or LLM provider, for example github or anthropic. null for a plain API key.

state
enum<string>
required

ready, reauth_required (the app must be signed in again) or disconnected.

Available options:
ready,
reauth_required,
disconnected
vaultId
string
required
version
integer
required

A key's current version, for If-Match on a change. 0 for an app, which has no versions.