> ## 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.

# Freestyle sandboxes

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

Freestyle VMs are full Linux virtual machines for long-running agent tasks that can be paused, snapshotted and resumed.

The following table shows what CostGraph runs on this provider.

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

## Connect

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

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

2. Enter these fields:

   * **API key** (`FREESTYLE_API_KEY`, required): A Freestyle API key, created with freestyle tokens create.

3. Click **Connect**.

Sandbox size comes from the snapshot set as `providerTemplate`.

### Your own dispatcher

To keep the key out of CostGraph or reach a private network, run your own dispatcher instead.
Set `provider` to `freestyle` 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).

## Key and permissions

FREESTYLE\_API\_KEY is a Freestyle account API key, minted with `npx freestyle@latest tokens create <name>` after "freestyle login" (shown once; list/revoke with `freestyle tokens list/revoke`).

Keys are not scoped: "tokens create" takes only a name, and an account API key "already belongs to one team" with access to that team's VMs. No per-key permissions are documented (per-end-user identity tokens are a separate mechanism).

Sources: [www.freestyle.sh: quickstart](https://www.freestyle.sh/docs/quickstart), [www.freestyle.sh: cli](https://www.freestyle.sh/docs/cli), [www.freestyle.sh: lifecycle](https://www.freestyle.sh/docs/vms/lifecycle), [www.freestyle.sh: pricing and limits](https://www.freestyle.sh/docs/vms/pricing-and-limits).

## Limits

* Idle timeout (idleTimeoutSeconds) pauses VMs with no network activity when configured; optional ttlSeconds, maxRunSeconds and maxRunTotalSeconds pause or delete VMs; -1 removes a limit. ([source](https://www.freestyle.sh/docs/vms/lifecycle))
* Max per VM: Free 4 vCPU / 8 GiB / 32 GB, Hobby 8 vCPU / 16 GiB / 64 GB, Pro 32 vCPU / 64 GiB / 256 GB; concurrent VMs Free 10, Hobby 40, Pro 400. ([source](https://www.freestyle.sh/docs/vms/pricing-and-limits))
* On Free, exhausting a monthly compute allowance pauses affected VMs. ([source](https://www.freestyle.sh/docs/vms/pricing-and-limits))

## 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.