Overview
Amps AI provides two environments for development and production use: Sandbox and Live. Understanding the differences and when to use each is essential for building reliable integrations.Sandbox Environment
The Sandbox environment is designed for testing and development. It provides realistic device simulations without requiring real OEM credentials or physical devices.Key Features
- Realistic Device Behavior: Sandbox devices simulate real-world behavior patterns based on UTC time
- No Real Credentials Required: Test authentication flows with mock credentials
- Separate Data: Sandbox data is completely isolated from production
- No Device Limits: Test with unlimited devices without subscription constraints
- Safe Testing: Experiment without affecting real user devices or data
Sandbox Simulations
Sandbox devices simulate realistic behavior patterns based on UTC time:Vehicles
Vehicles follow time-of-day charging patterns:- Morning (6-9am UTC): Vehicle likely plugged in, charging or fully charged (80-95% battery)
- Daytime (9am-5pm UTC): Vehicle likely unplugged, battery level decreases (95% → 71%)
- Evening (5-9pm UTC): Vehicle may be plugged in for overnight charging (70% → 50%)
- Night (9pm-6am UTC): Vehicle plugged in, charging overnight (50% → 82%)
Batteries
Batteries follow solar production and usage cycles:- Morning (6-9am UTC): Discharging for morning load (70% → 46%)
- Midday (9am-3pm UTC): Charging from solar production (50% → 92%)
- Evening (3-9pm UTC): Discharging for peak usage (90% → 30%)
- Night (9pm-6am UTC): Idle or slow charging
Solar Inverters
Solar inverters follow daily production patterns:- Night (6pm-6am UTC): No production (night mode)
- Morning (6-9am UTC): Ramping up production
- Midday (9am-3pm UTC): Peak production
- Afternoon (3-6pm UTC): Declining production
- Seasonal Variation: Production varies by month (less in winter)
When to Use Sandbox
- Development and integration testing
- Prototyping new features
- Testing error handling and edge cases
- Learning the API without real devices
- CI/CD pipeline testing
- Demo environments
Live Environment
The Live environment connects to real OEM devices and production data.Key Features
- Real Device Access: Connects to actual user devices via OEM APIs
- Production Data: All data is real and affects actual devices
- Device Limits: Subject to subscription plan limits
- Real Credentials: Requires valid OEM authentication
- Production Ready: Use for customer-facing applications
When to Use Live
- Production applications
- Customer-facing integrations
- Real device control and monitoring
- Production data access
- Live user connections
URL Structure
Link UI
The Link UI uses the same base URL for both environments. The environment is determined by a query parameter: Base URL:sandbox query parameter accepts true or 1 to enable sandbox mode. If omitted, the environment defaults to Live.
Public API
The Public API uses different hostnames to determine the environment: Sandbox:API Keys
API keys are environment-specific:- Sandbox Keys: Format
sk_sandbox_...- Only work withsandbox-api.amps.ai - Live Keys: Format
sk_live_...- Only work withapi.amps.ai
Sandbox API keys will not work with the Live API, and vice versa. Make sure you’re using the correct API key for the environment you’re targeting.
Environment Selection
Link UI
When generating Link UI URLs for your users:- For Testing: Append
?sandbox=trueto the URL - For Production: Use the base URL without query parameters
API Requests
When making API requests:- Sandbox: Use
https://sandbox-api.amps.aiwith a sandbox API key - Live: Use
https://api.amps.aiwith a live API key
Data Isolation
Sandbox and Live environments maintain complete data isolation:- Separate database schemas (
sandbox.*vslive.*) - Separate credentials and devices
- Separate customer data
- No cross-environment data access
Webhook Timing
Webhook delivery timing differs between environments:- Sandbox: Webhooks are delivered with a 3-minute delay after action completion (configurable)
- Live: Webhooks are typically delivered within 10 seconds after action completion
Migration from Sandbox to Live
When you’re ready to move from Sandbox to Live:- Test Thoroughly: Ensure all functionality works in Sandbox
- Get Live API Keys: Generate live API keys from your dashboard
- Update URLs: Switch from
sandbox-api.amps.aitoapi.amps.ai - Update Link UI: Remove
?sandbox=truefrom Link UI URLs - Test with Real Devices: Connect real devices and verify behavior
- Monitor: Watch for any differences between sandbox and live behavior
Next Steps
Getting Started
Set up your first integration
API Authentication
Learn about API key authentication
Link UI Guide
Understand device authentication flow
Webhooks
Set up webhook endpoints