Create your first sandbox
Configure one provider, create an ArenAPI key, then use the same sandbox identifier for every operation.
1. Add a provider
Provider tokens are encrypted at rest and never returned by the service. Providers connected through the standard driver also need a
driver_url
in their configuration.
curl https://arenapi.com/api/v1/providers \
--request POST \
--header "Authorization: Bearer $ARENAPI_KEY" \
--header "Content-Type: application/json" \
--data '{
"name": "Runloop primary",
"kind": "runloop",
"token": "$RUNLOOP_API_KEY",
"priority": 10
}'
2. Create a sandbox
The portable capabilities are required by default. Add optional requirements when the workload depends on them.
curl https://arenapi.com/api/v1/sandboxes \
--request POST \
--header "Authorization: Bearer $ARENAPI_KEY" \
--header "Content-Type: application/json" \
--data '{
"provider": "auto",
"image": "python:3.13-slim",
"timeout_seconds": 300,
"required_capabilities": ["lifecycle", "commands", "files"],
"metadata": {"purpose": "agent-code-exec"}
}'
3. Execute and clean up
curl https://arenapi.com/api/v1/sandboxes/sbx_123/exec \
--request POST \
--header "Authorization: Bearer $ARENAPI_KEY" \
--header "Content-Type: application/json" \
--data '{"command": "python -c \\"print(40 + 2)\\""}'
curl https://arenapi.com/api/v1/sandboxes/sbx_123 \
--request DELETE \
--header "Authorization: Bearer $ARENAPI_KEY"