API keys authenticate your CLI deployments. Each deployment requires a valid API key linked to an active subscription.
Key Format
API keys are 16-character lowercase alphanumeric strings:
gv60gskk9fvso4ym
Using Your API Key
Environment Variable (Recommended)
export PREV_API_KEY="your-api-key"prev create .
CLI Flag
prev create . --api-key your-api-key
Configuration File
Add to ~/.prev.yaml:
api_key: your-api-key
Individual Plan
On the Individual plan, you receive one API key that is automatically generated when you subscribe.
- View your key in the dashboard
- Copy the full key to your clipboard
- See when the key was created and last used
- The key cannot be deleted (you must always have at least one)
Business Plan
Business plan users can create and manage unlimited API keys — ideal for teams.
Creating Keys
Key Labels
Label keys to identify who or what uses them:
Frontend TeamCI/CD PipelineDeveloper: John
Per-Key Environment Limits
Set a maximum number of concurrent environments each key can create. This prevents any single team member from using all available slots.
Per-Key IP Allowlists
Restrict which IP addresses can use a specific API key. Uses CIDR notation:
10.0.0.0/8, 192.168.1.0/24You can also lock the allowlist to prevent the CLI --ip-allow flag from adding additional IPs.
Revoking Keys
Deleting an API key that has active environments will also destroy those environments. The dashboard will warn you and show the count of affected environments before confirming.