When to use this
Safe development
Developers can test integrations without touching production data.
Automated testing
CI/CD pipelines can run tests with keys that won’t affect live resources.
Different limits
Test keys might have lower rate limits or be free to use.
Prevent accidents
Prefixes like
sk_test_ make it obvious when using non-production keys.How it works
Environments are implemented using key metadata and prefixes, there’s no special “environment” field. This gives you full flexibility to model environments however you want. Common pattern:- Prefix:
sk_test_vssk_live_(visible to users) - Metadata:
{ "environment": "test" }(returned on verification)
Create environment-specific keys
Verify and check environment
The metadata is returned during verification, so your API can behave differently:Handle environments in your API
Common patterns
Different rate limits per environment
Sandbox vs real resources
Block test keys from production endpoint
Next steps
API Keys overview
Learn about key metadata and features
Rate limiting
Set different limits per environment