Skip to content

Get an API key

All calls to SotsAI are authenticated using an organization API key.

API keys identify your organization (not individual users) and are used for:

  • authentication
  • usage tracking
  • billing and quota enforcement

API keys are created from the SotsAI Admin page.

  1. Log in to the SotsAI Admin page
  2. Go to API Keys
  3. Click Create API key
  4. Copy the key — it will only be shown once

You can create multiple keys (for example: staging vs production).


API keys must be sent on every request using the X-Sotsai-Api-Key header:

X-Sotsai-Api-Key: sotsai_proxxxxxxxxxxxxxxxxx

All endpoints are prefixed with /v1.

Base URL: https://sil-api.sotsai.co/

Example request:

POST /v1/advice
Host: sil-api.sotsai.co
X-Sotsai-Api-Key: sotsai_proxxxxxxxxxxxxxxxxx
Content-Type: application/json

API keys are:

  • scoped to a single organization
  • not user-specific
  • valid until explicitly revoked

All usage, billing, and quotas are tracked per organization, not per key.


Recommended practices:

  • store keys in environment variables
  • never expose keys in frontend code
  • rotate keys periodically
  • use separate keys for staging and production
  • revoke unused or compromised keys immediately

If a key is missing, invalid, or revoked, the API will return an authentication error.

Typical error cases:

  • missing X-Sotsai-Api-Key header
  • unknown or deleted key
  • organization suspended or inactive
  • quota exceeded

See API Reference → Error codes for details.


Once you have an API key, continue with: