Moving from E2B to CoAI Sandbox
Your code does not change. You change the two environment variables, check the features you use against the compatibility page, and review the limits of your level.
1. The environment
| E2B | CoAI Sandbox | |
|---|---|---|
E2B_API_KEY |
your E2B key (e2b_...) |
your CoAI Sandbox key (ack_..., from the CoAI Sandbox console) |
E2B_DOMAIN |
unset (e2b.app) |
sandbox.coaiwork.com |
E2B_ACCESS_TOKEN |
for the CLI and template builds | not used: CoAI Sandbox has no template builds yet |
If you pass api_key= / apiKey: or domain= / domain: in code instead, change them there.
2. Templates
Use base (the default) or code-interpreter-v1. A custom template name is refused with 404 template_not_found.
3. Features
Pause and resume, autoPause, MCP, volumes, header transforms and template builds are not available (compatibility page).
Creating a sandbox with one of these options answers 400 unsupported_feature instead of silently ignoring it.
4. Limits and money
- Your level sets how many sandboxes run at once, how long they can live and their outbound speed (tiers and limits page); a new account starts at A0. Internet access is allowlist only at every level for now (network page; open internet access for A1 and A2 is planned).
- You pay per millisecond from your CoAI Host account balance (pricing page), with $10 of welcome credit for eligible accounts
when you verify your account. Errors you will not see on E2B: 402
insufficient_balanceand 429spend_cap_reached(errors page).
5. Check
Run the quickstart of this documentation with the new variables. If it prints hello from CoAI Sandbox, your SDK and key
work; then run your own test suite.