Skip to content

Authentication ​

SiliconRig supports two authentication methods: email/password for the web UI, and API keys for programmatic access.

Web UI login ​

Sign up or log in at siliconrig.dev with your email and password. The web UI uses session cookies — no extra setup needed.

API keys ​

API keys are used by the CLI, Python SDK, CI/CD integrations, and direct API calls.

Creating a key ​

  1. Log in to siliconrig.dev
  2. Go to API Keys in the sidebar
  3. Click Create Key and optionally add a label (e.g. "CI pipeline", "local dev")
  4. Copy the key immediately — it's shown once and cannot be retrieved later

You can also create keys via the API:

bash
curl -X POST https://api.srig.io/v1/auth/keys \
  -H "Authorization: Bearer key_..." \
  -H "Content-Type: application/json" \
  -d '{"label": "my new key"}'

API keys are available on every tier, including the free one. What limits use is the credit balance, not the key.

Key format ​

Keys are prefixed with key_ followed by 48 hex characters:

key_a1b2c3d4e5f6...

Keys are hashed (SHA-256) before storage — SiliconRig never stores your raw key.

Using a key ​

Set the SRIG_API_KEY environment variable:

bash
export SRIG_API_KEY=key_...

The CLI and Python SDK pick this up automatically. For direct API calls, pass it in the Authorization header:

bash
curl https://api.srig.io/v1/boards \
  -H "Authorization: Bearer key_..."

Managing keys ​

View and revoke keys from the API Keys page in the web UI, or via the API:

bash
# List your keys
curl https://api.srig.io/v1/auth/keys \
  -H "Authorization: Bearer key_..."

# Revoke a key
curl -X DELETE https://api.srig.io/v1/auth/keys/key_abc123 \
  -H "Authorization: Bearer key_..."

Keys cannot be renamed after creation. To change a label, revoke the key and create a new one.

Authentication order ​

When multiple credentials are present, SiliconRig checks in this order:

  1. Session cookie (web UI)
  2. Authorization: Bearer ... header, holding either an API key or a session token
  3. X-API-Key: key_... header, which is what the CLI and the SDK send