> ## Documentation Index
> Fetch the complete documentation index at: https://docs.costgraph.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Blaxel sandboxes

> Run CostGraph workflows and CI jobs in Blaxel sandboxes: the key to create, its permissions, and its limits

Blaxel Sandboxes are lightweight micro-VMs for running agent or LLM-generated code that resume from standby in under 25 ms and scale to zero when idle.

The following table shows what CostGraph runs on this provider.

| Workflows | CI runners | Connect with |
| - | - | - |
| Yes | Yes | Integrations or your own dispatcher |

## Connect

Connect Blaxel on Integrations, and CostGraph starts sandboxes in your Blaxel account. You don't run anything yourself.

1. In CostGraph, go to **Integrations > Sandbox > Blaxel**.

2. Enter these fields:

   * **Workspace API key** (`BL_API_KEY`, required): A Blaxel workspace API key from a service account in workspace settings.
   * **Workspace** (`BL_WORKSPACE`, required): The Blaxel workspace name, shown in the console URL.

3. Click **Connect**.

For CI runners, CostGraph sizes the sandbox by memory (1 vCPU per 2 GB) and boots `providerTemplate` as the Blaxel image.

### Your own dispatcher

To keep the key out of CostGraph or reach a private network, run your own dispatcher instead.
Set `provider` to `blaxel` and the preceding fields as environment variables, as described in [Run your own dispatcher](https://docs.costgraph.ai/costgraph/workflows/managed-sandboxes.md#run-your-own-dispatcher).

To see what Blaxel costs, connect the [Blaxel integration](https://docs.costgraph.ai/costgraph/integrations/blaxel.md).

## Key and permissions

BL\_API\_KEY is a Blaxel workspace API key, which belongs to a service account; admins create it in the Blaxel console under workspace settings > service accounts (or 'Create workspace API key'). BL\_WORKSPACE is the workspace name, shown in the console URL.

Keys act with their service account's workspace role (admin, member or viewer; 'admin' by default). The member role is the minimum that can create, delete and use the sandbox process/filesystem API; viewer can only list and view. So: a service account with role member.

Sources: [docs.blaxel.ai: Workspace access control](https://docs.blaxel.ai/Security/Workspace-access-control.md), [docs.blaxel.ai: Service accounts](https://docs.blaxel.ai/Security/Service-accounts.md), [docs.blaxel.ai: Overview](https://docs.blaxel.ai/Sandboxes/Overview.md), [docs.blaxel.ai: Expiration](https://docs.blaxel.ai/Sandboxes/Expiration.md), [docs.blaxel.ai: Processes](https://docs.blaxel.ai/Sandboxes/Processes.md).

## Limits

* Standby (scale-to-zero) after about 15 seconds with no active connection; an idle WebSocket/TCP connection also times out after 15 minutes. A process launched with keepAlive keeps the sandbox awake (keepAlive processes default to a 600 s timeout unless set). ([source](https://docs.blaxel.ai/Sandboxes/Overview.md))
* keepAlive and process timeout semantics for long-running commands. ([source](https://docs.blaxel.ai/Sandboxes/Processes.md))
* CPU is derived from memory (for example 8 GB > 4 cores, 16 GB > 6 cores); ports 80, 443 and 8080 are reserved. ([source](https://docs.blaxel.ai/Sandboxes/Overview.md))
* Starter quotas enforce TTLs; higher quota tiers unlock unlimited persistence. ttl-idle counts only resume/suspend as activity, so a continuously running session longer than the idle TTL is deleted. ([source](https://docs.blaxel.ai/Sandboxes/Expiration.md))
* Sandbox counts, memory, sandbox size and TTL limits depend on the quota tier (driven by 30-day top-up volume); exceeding them returns QUOTA\_EXCEEDED. Exact numbers are only shown in the console Quotas tab. ([source](https://docs.blaxel.ai/Security/Quotas.md))

## Related

* [Supported sandbox providers](https://docs.costgraph.ai/costgraph/workflows/sandbox-providers.md)
* [Run workflows on a managed sandbox provider](https://docs.costgraph.ai/costgraph/workflows/managed-sandboxes.md)
* [Run CI jobs in sandboxes](https://docs.costgraph.ai/costgraph/autopilot/ci-sandboxes.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.