Environments
Understanding staging and production environments
Environment Overview
Brandparser provides two environments to help you develop and test your integration before going live.
| Environment | API Key Prefix | Use Case |
|---|---|---|
| Staging | bp_stag_ | Development, testing, CI/CD |
| Production | bp_prod_ | Live applications |
Both environments use the same API endpoints and behave identically. The difference is in billing and key management.
Staging Environment
Use staging keys for:
- Local development
- Integration testing
- CI/CD pipelines
- Exploring the API
Staging API calls are tracked for billing at the same rate as production. This ensures your usage estimates during development reflect actual costs.
Creating a Staging Key
- Go to Settings > API Keys
- Click Create API Key
- Select Staging as the environment
- Click Create
# Use your staging key for development
export BRANDPARSER_API_KEY=bp_stag_your_staging_keyProduction Environment
Use production keys for:
- Live customer-facing applications
- Production deployments
- Any system serving real users
Creating a Production Key
- Go to Settings > API Keys
- Click Create API Key
- Select Production as the environment
- Click Create
Best Practices
Separate Keys by Environment
Use different API keys for different deployment environments:
# Development
BRANDPARSER_API_KEY=bp_stag_dev_key
# Staging/QA
BRANDPARSER_API_KEY=bp_stag_qa_key
# Production
BRANDPARSER_API_KEY=bp_prod_production_keyEnvironment-Specific Configuration
// config.js
const config = {
development: {
apiKey: process.env.BRANDPARSER_STAGING_KEY,
baseUrl: "https://api.brandparser.com",
},
production: {
apiKey: process.env.BRANDPARSER_PRODUCTION_KEY,
baseUrl: "https://api.brandparser.com",
},
};
export default config[process.env.NODE_ENV || "development"];Usage Tracking
Both staging and production calls are tracked for billing purposes. You can view your usage breakdown by environment in your dashboard under Settings > Usage.
Usage is metered per parse request. Polling for results (GET requests) does not count toward usage.
Switching Environments
To switch between environments, simply use a different API key. No code changes are required - the API endpoints are identical.
# Staging
curl -H "Authorization: Bearer bp_stag_xxx" ...
# Production
curl -H "Authorization: Bearer bp_prod_xxx" ...FAQ
Are staging and production data separate?
No. Brands created in staging are real brands in your workspace. The environment designation is primarily for key management and usage tracking.
Can I use staging keys in production?
Technically yes, but we recommend against it. Using properly scoped keys helps you:
- Track usage by environment
- Rotate keys independently
- Maintain security boundaries
Is there a free tier or sandbox?
There is no separate sandbox environment. Use staging keys for testing - usage is tracked but you can control costs by limiting test volume.