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

# Configuring Devbox Instance Sizes

> Configure your Devboxes using predefined sizes

<Tip>Start with the [Runloop Quickstart](/docs/tutorials/quickstart) to use the examples below.</Tip>

Runloop offers flexible options to tailor your Devbox resources and lifecycle to your specific AI workloads. This guide covers predefined resource sizes for standardized configurations.

## Predefined Resource Sizes

Runloop provides the following resource configurations for Devboxes:

| Size      | CPU | Memory | Storage | \$/hr    |
| --------- | --- | ------ | ------- | -------- |
| X\_SMALL  | 0.5 | 1 GB   | 4 GB    | \$0.0806 |
| SMALL     | 1   | 2 GB   | 4 GB    | \$0.1598 |
| MEDIUM    | 2   | 4 GB   | 8 GB    | \$0.3195 |
| LARGE     | 2   | 8 GB   | 16 GB   | \$0.4231 |
| X\_LARGE  | 4   | 16 GB  | 16 GB   | \$0.8407 |
| XX\_LARGE | 8   | 32 GB  | 16 GB   | \$1.6760 |

<Note>
  Compute is billed only while devbox status is one of \[`initializing`, `running`, `suspending`, `resuming`].
</Note>

## Launch Parameters

When creating a Devbox, use `LaunchParameters` to specify the desired configuration.

### Resource Size

Set the `resource_size_request` parameter to choose a predefined size:

<CodeGroup>
  ```python Python theme={null}
  devbox = await runloop.devbox.create(
      launch_parameters={
          "resource_size_request": "MEDIUM"
      }
  )

  print(f"Devbox created with ID: {devbox.id}")
  ```

  ```typescript TypeScript theme={null}
  const devbox = await runloop.devbox.create({
    launch_parameters: {
      resource_size_request: "MEDIUM"
    }
  });

  console.log(`Devbox created with ID: ${devbox.id}`);
  ```
</CodeGroup>

This example creates a Devbox with 2 CPU cores and 2Gi of memory.

## Custom Resource Sizes

To use custom resource sizes, set the `resource_size_request` parameter to `CUSTOM_SIZE` and specify the desired resource sizes in the `custom_cpu_cores` and `custom_gb_memory` parameters. We offer granular customization in these ranges:

<Warning>
  Both `custom_cpu_cores` and `custom_gb_memory` parameters are required using `resource_size_request: CUSTOM_SIZE`.
</Warning>

* CPU: Must be multiple of 2. Min is 0.5 core, max is 16 cores.
* Memory: Must be multiple of 2. Min is 1GiB, max is 64GiB.
* Storage: Optional. Must be multiple of 2. Min is 2GiB, max is 64GiB. If not specified, the default of 16GiB will be used.

<CodeGroup>
  ```python Python theme={null}
  devbox = await runloop.devbox.create(
      launch_parameters={
          "resource_size_request": "CUSTOM_SIZE",
          "custom_cpu_cores": 4,
          "custom_gb_memory": 32
      }
  )
  print(f"Devbox created with ID: {devbox.id}")
  ```

  ```typescript TypeScript theme={null}
  const devbox = await runloop.devbox.create({
    launch_parameters: {
      resource_size_request: "CUSTOM_SIZE",
      custom_cpu_cores: 4,
      custom_gb_memory: 32
    }
  });

  console.log(`Devbox created with ID: ${devbox.id}`);
  ```
</CodeGroup>
