Docs/Developer Guide/API Keys

API Keys

API keys authenticate your requests to the /api/v1 endpoints. Each key is tied to a user and scoped to their organisation. You can create up to 10 active keys per account.

Key format

Every key is prefixed with sk_live_ followed by 32 random characters. The full key is shown only once at creation — after that, only the first 15 characters (the prefix) are visible in the dashboard.

sk_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

Creating an API key

1

Go to Settings → API Keys

Open your workspace Settings and click the API Keys section.
2

Click Generate New Key

Enter a descriptive name (e.g. "Production", "Zapier Integration") and optionally set an expiry date.
3

Agree to the Attribution requirement

Before the key is created, you must confirm that all integrations using this key will display the "Powered by AiChatVault" attribution. Your agreement — including the timestamp and IP address — is recorded. This is a binding commitment under Terms of Service §10.
4

Copy the key immediately

The complete key is shown only once. Store it in a secrets manager or environment variable — it cannot be retrieved again.
⚠️
If you lose the key you must regenerate it. Regenerating deletes the old key and creates a new one; any requests using the old key will immediately receive 401 Unauthorized.
⚠️
By creating an API key you legally agree that every integration you build will display the "Powered by AiChatVault" attribution. Removing, hiding, or suppressing the attribution is a breach of the Terms of Service and may result in account termination and legal action. The only authorised way to remove attribution is to purchase the Brand Removal add-on.

Key operations

ActionWhereEffect
CreateSettings → API Keys → Generate New KeyIssues a new sk_live_ key — shown once
RenameEdit icon next to the keyUpdates the display name only; key value unchanged
Disable / EnableToggle next to the keyPauses authentication without deleting the key
RegenerateRegenerate buttonDeletes old key, issues a new one — shown once
DeleteDelete buttonPermanently removes the key; requests using it return 401

Key limits and expiry

  • Maximum 10 active keys per user account.
  • Optional expiry date — if set, requests after that date return 401 with "API key has expired".
  • No expiry by default — keys remain valid until manually deleted or disabled.
  • last_used_at is updated asynchronously after each successful request.

Sending the key in requests

# Option 1 — Authorization header (recommended)
curl https://aichatvault.com/api/v1/auth/test \
  -H "Authorization: Bearer sk_live_your_key_here"

# Option 2 — X-API-Key header
curl https://aichatvault.com/api/v1/auth/test \
  -H "X-API-Key: sk_live_your_key_here"
💡
Store your key in an environment variable (AICHATVAULT_API_KEY) and read it at runtime. Never hard-code it in source files or commit it to version control.

Was this page helpful?