Skip to main content
All API requests require an API key. Pass it as a Bearer token in the Authorization header:
curl https://api.verial.ai/environments \
  -H "Authorization: Bearer vk_xxx"

Creating Keys

  1. Go to Settings > API Keys in the Verial dashboard
  2. Click Create Key
  3. Copy the key immediately. It will not be shown again.
API keys are prefixed with vk_ for identification.

Key Permissions

Keys inherit the permissions of the organization that created them. A key can only access resources within its organization.

Using the SDK

The SDK accepts the API key at initialization:
import Verial from '@verial-ai/sdk'

const verial = new Verial({
  apiKey: process.env.VERIAL_API_KEY,
})

Security Best Practices

  • Store keys in environment variables, not in source code or version control
  • Rotate keys periodically and revoke any that may have been compromised
  • Use separate keys for development and production environments
  • Limit key distribution to the services that need API access
# Good: key in environment variable
export VERIAL_API_KEY=vk_xxx
curl -H "Authorization: Bearer $VERIAL_API_KEY" ...

# Bad: key in source code
curl -H "Authorization: Bearer vk_xxx" ...

Error Responses

Requests without a valid API key return a 401 Unauthorized response:
{
  "error": {
    "code": "UNAUTHORIZED",
    "message": "Missing or invalid API key"
  }
}