For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
  • Get Started
    • Introduction
    • Quickstart
    • Authentication
  • Python SDK
    • Install
    • Usage
    • Errors
  • CLI
    • Overview
      • login
      • workflows
      • voices
      • templates
      • uploads
LogoLogo
On this page
  • login
  • Synopsis
  • Description
  • Flags
  • Examples
  • Errors
  • Related
  • logout
  • Synopsis
  • Description
  • Example
  • whoami
  • Synopsis
  • Description
  • Example
CLICommands

onepin login / logout / whoami

Was this page helpful?
Previous

workflows

Next
Built with

login

Synopsis

onepin login [--key KEY] [--base-url URL]

Description

Authenticates with the OnePin API and saves credentials to ~/.onepin/credentials.

  1. Resolves the key from --key or prompts interactively (input is hidden).
  2. Validates the key by calling GET /api/v1/auth/whoami.
  3. Writes ~/.onepin/credentials with mode 0600 (parent dir 0700).
  4. Prints the authenticated identity and the path where credentials were saved.

Flags

FlagDescription
--key TEXTSupply the API key non-interactively
--base-url TEXTOverride the API base URL (default: https://api.onepin.ai)

Examples

Interactive:

$onepin login
$# OnePin API key: ········
$# ✓ Logged in.
$# Workspace: 3fa85f64-5717-4562-b3fc-2c963f66afa6
$# Scopes: workflows:read, workflows:write, voices:read
$# Saved to: ~/.onepin/credentials

Non-interactive (CI):

$onepin login --key "$ONEPIN_API_KEY"

Custom base URL (local dev):

$onepin login --key "$ONEPIN_API_KEY" --base-url http://localhost:8000

JSON output:

$onepin login --key "$ONEPIN_API_KEY" --json
1{
2 "user_id": "usr_01HZ...",
3 "workspace_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
4 "scopes": ["workflows:read", "workflows:write", "voices:read"],
5 "key_name": "ci-pipeline"
6}

Errors

ConditionMessageExit
Invalid or revoked keyInvalid API key. Generate one at https://app.onepin.ai/settings/api-keys1
Network unreachableCannot reach https://api.onepin.ai — check your connection1
Key missing op_live_ prefixKey must start with op_live_1

Related

  • logout — remove saved credentials
  • whoami — verify current credentials without re-saving

logout

Synopsis

onepin logout

Description

Removes the [default] section from ~/.onepin/credentials. Does not revoke the key — revoke it in the dashboard if needed.

Example

$onepin logout
$# ✓ Credentials removed from ~/.onepin/credentials

whoami

Synopsis

onepin whoami

Description

Displays the authenticated identity for the current credentials without modifying any local state.

Example

$onepin whoami
User: kj@podonos.com
User ID: usr_01JXXXXXXXXXXXXXXXXXXXXX
Workspace: 3fa85f64-5717-4562-b3fc-2c963f66afa6
Key name: ci-pipeline
Scopes: workflows:read, workflows:write, voices:read

v0.2: The workspace display name is not yet returned by the API. The workspace UUID is shown instead.

JSON output:

$onepin whoami --json
1{
2 "user_id": "usr_01JXXXXXXXXXXXXXXXXXXXXX",
3 "workspace_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
4 "key_name": "ci-pipeline",
5 "scopes": ["workflows:read", "workflows:write", "voices:read"]
6}