Skip to main content

Module gateway

Module gateway 

Source
Expand description

LeanCTX Cloud model gateway key (POST /v1/gateway/key): a short-lived key with which this computer’s sessions run on models from LeanCTX, paid from the team’s balance.

Asked only when a local reader (LeanCTX Code) asks for it; the key is handed to that reader and never written to disk, cached or logged (GatewayKey’s Debug hides it). The reader keeps it in memory until expires_at.

The cloud answers (contract W1):

Anything else is a CloudError.

Structs§

GatewayKey
A key the gateway handed out. Cloud answers grow additively, so fields not named here (schema, models, later ones) are not kept.

Enums§

GatewayAnswer
What the gateway said.

Constants§

BALANCE_RESOURCE
The quota a stopped balance names.
KEY_LIMIT_REASON
The reason of a 429 rate_limited refused because this computer already holds the most live keys.
KEY_SCHEMA
The schema of a key document.

Functions§

request
Ask the connected cloud for a gateway key.