Authentication
Onepin uses API keys for all SDK and CLI access.
Create a key
Go to app.onepin.ai → Settings → API → Create new key, select the scopes you need, and copy the value — it’s shown only once.
A key is scoped to a single workspace: every resource it touches — workflows, templates, uploads — lives in the workspace it was created under.
Use the key
Run onepin login once and paste the key:
It’s stored and picked up automatically by both the CLI and the SDK — OnepinClient() needs no arguments.
To pass the key explicitly instead (CI, or without onepin login):
- SDK:
OnepinClient(api_key="op_live_...") - CLI:
--api-key op_live_... - Env:
export ONEPIN_API_KEY=op_live_...
Resolution order: explicit api_key → ONEPIN_API_KEY → the key saved by onepin login.
Scopes
Pick the minimum your key needs:
Keep keys safe
A key grants full API access for its scopes — treat it like a password. Keep it out of source control; store it in a secrets manager or a local .env file. Rotate or revoke a key anytime in Settings → API.

