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

# Create a sandbox

> Returns a sandbox id drawn from the warm pool (7–11 ms) or cold-booted if the pool is empty.

<ParamField body="template" type="string" required={false}>
  Template name for pool selection. Defaults to the primary pool. Pool
  flavors (e.g. `python-datasci`, `node-web`) are planned — see the
  roadmap.
</ParamField>

<RequestExample>
  ```bash curl theme={null}
  curl -X POST https://api.podflare.ai/v1/sandboxes \
    -H 'content-type: application/json' \
    -d '{}'
  ```

  ```python Python theme={null}
  from podflare import Sandbox

  sbx = Sandbox()
  print(sbx.id)
  ```

  ```ts TypeScript theme={null}
  import { Sandbox } from "podflare";
  const sbx = await Sandbox.create();
  console.log(sbx.id);
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={null}
  {
    "id": "sbx_1cc2937f86644dc3a3ad3ffb9010c70d",
    "state": "ready"
  }
  ```
</ResponseExample>

<ResponseField name="id" type="string">
  The sandbox id. Use it in subsequent `exec`, `fork`, `merge_into`, or
  `destroy` calls.
</ResponseField>

<ResponseField name="state" type="string">
  Always `ready` on success — the sandbox is already booted and the
  in-guest agent is accepting connections.
</ResponseField>
