> ## Documentation Index
> Fetch the complete documentation index at: https://vastai-80aa3a82-auto-cli-sdk-preview-pr-398.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# VastAI.create_volume

Create a new volume from an offer ID.

## Signature

```python theme={null}
VastAI.create_volume(
    id: int,
    size: float = 15,
    name: Optional[str] = None
) -> dict
```

## Parameters

<ParamField path="id" type="int" required>
  id of volume offer
</ParamField>

<ParamField path="size" type="float" default="15">
  size in GB of volume. Default %(default)s GB.
</ParamField>

<ParamField path="name" type="Optional[str]">
  Optional name of volume.
</ParamField>

## Returns

`dict`

## Example

```python theme={null}
from vastai import VastAI

client = VastAI(api_key="YOUR_API_KEY")
result = client.create_volume(id=12345)
print(result)
```
