> For the complete documentation index, see [llms.txt](https://docs.sesterce.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.sesterce.com/api-reference/volumes.md).

# Volumes

### Retrieve available Volume offers

{% hint style="danger" %}
To be attached to an instance, volumes should be linked to the same `CloudProvider` and the same `region` as the Pod selected. Get all informations about Volumes[ into this section](https://docs.sesterce.com/compute-instances.md#i-need-a-persistent-storage)
{% endhint %}

Access this endpoint to explore available volume offers, which is crucial when planning storage needs for your instances.

## GET /gpu-cloud/volumes/offers

>

```json
{"openapi":"3.0.0","info":{"title":"Cloud Sesterce API","version":"1.0"},"paths":{"/gpu-cloud/volumes/offers":{"get":{"operationId":"GPUCloudVolumesController_getOffers","parameters":[{"name":"x-api-key","in":"header","description":"The API Key secret should be sent through this header to authenticate the request.","required":true,"allowEmptyValue":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Return all available volume offers","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/VolumeOfferDto"}}}}},"403":{"description":"API key invalid","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"number"},"timestamp":{"type":"string"},"path":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"API key not found","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"number"},"timestamp":{"type":"string"},"path":{"type":"string"},"message":{"type":"string"}}}}}}},"tags":["GPUCloudVolumes"]}}},"components":{"schemas":{"VolumeOfferDto":{"type":"object","properties":{"provider":{"type":"string"},"availabilityZone":{"$ref":"#/components/schemas/CloudProviderDto"},"regions":{"type":"array","items":{"$ref":"#/components/schemas/VolumeOfferRegionDto"}}},"required":["provider","availabilityZone","regions"]},"CloudProviderDto":{"type":"object","properties":{"_id":{"type":"string"},"name":{"type":"string"}},"required":["_id","name"]},"VolumeOfferRegionDto":{"type":"object","properties":{"region":{"type":"string"},"country":{"type":"string"},"name":{"type":"string"},"pricePerGbPerHour":{"type":"number"},"minSizeInGb":{"type":"number"}},"required":["region","country","name","pricePerGbPerHour","minSizeInGb"]}}}}
```

### Create a new Volume

This endpoint is used when you need to create new Volume to add a persistent storage solution to your instance, ensuring to keep your dataset stored even after the instance stops.

The minimum accepted value for `sizeInGb` is 50 GB. Use an available volume offer and check its region and availability-zone requirements before creating the volume.

## POST /gpu-cloud/volumes

>

```json
{"openapi":"3.0.0","info":{"title":"Cloud Sesterce API","version":"1.0"},"paths":{"/gpu-cloud/volumes":{"post":{"operationId":"GPUCloudVolumesController_create","parameters":[{"name":"x-api-key","in":"header","description":"The API Key secret should be sent through this header to authenticate the request.","required":true,"allowEmptyValue":false,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateVolumeDto"}}}},"responses":{"201":{"description":"Return the created volume","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VolumeDto"}}}},"403":{"description":"API key invalid","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"number"},"timestamp":{"type":"string"},"path":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"API key not found","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"number"},"timestamp":{"type":"string"},"path":{"type":"string"},"message":{"type":"string"}}}}}}},"tags":["GPUCloudVolumes"]}}},"components":{"schemas":{"CreateVolumeDto":{"type":"object","properties":{"cloudProvider":{"type":"string"},"region":{"type":"string"},"name":{"type":"string"},"sizeInGb":{"type":"number"}},"required":["cloudProvider","region","name","sizeInGb"]},"VolumeDto":{"type":"object","properties":{"_id":{"type":"string"},"name":{"type":"string"},"capacity":{"type":"number"},"availabilityZone":{"type":"string"},"region":{"type":"object"},"hourlyPrice":{"type":"number"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["_id","name","capacity","availabilityZone","region","hourlyPrice","createdAt","updatedAt"]}}}}
```

### Get the list of Volumes created

Use this endpoint to get an overview of your active volumes, useful for monitoring storage usage and planning expansions.

## GET /gpu-cloud/volumes

>

```json
{"openapi":"3.0.0","info":{"title":"Cloud Sesterce API","version":"1.0"},"paths":{"/gpu-cloud/volumes":{"get":{"operationId":"GPUCloudVolumesController_getUserVolumes","parameters":[{"name":"x-api-key","in":"header","description":"The API Key secret should be sent through this header to authenticate the request.","required":true,"allowEmptyValue":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Return all volumes","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/VolumeDto"}}}}},"403":{"description":"API key invalid","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"number"},"timestamp":{"type":"string"},"path":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"API key not found","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"number"},"timestamp":{"type":"string"},"path":{"type":"string"},"message":{"type":"string"}}}}}}},"tags":["GPUCloudVolumes"]}}},"components":{"schemas":{"VolumeDto":{"type":"object","properties":{"_id":{"type":"string"},"name":{"type":"string"},"capacity":{"type":"number"},"availabilityZone":{"type":"string"},"region":{"type":"object"},"hourlyPrice":{"type":"number"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["_id","name","capacity","availabilityZone","region","hourlyPrice","createdAt","updatedAt"]}}}}
```

### Get details of a specific Volume

Get specific details about a particular volume when you need to verify its configuration or status.

## GET /gpu-cloud/volumes/{id}

>

```json
{"openapi":"3.0.0","info":{"title":"Cloud Sesterce API","version":"1.0"},"paths":{"/gpu-cloud/volumes/{id}":{"get":{"operationId":"GPUCloudVolumesController_getVolumeById","parameters":[{"name":"x-api-key","in":"header","description":"The API Key secret should be sent through this header to authenticate the request.","required":true,"allowEmptyValue":false,"schema":{"type":"string"}},{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Return volume by ID","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VolumeDto"}}}},"403":{"description":"API key invalid","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"number"},"timestamp":{"type":"string"},"path":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"number"},"timestamp":{"type":"string"},"path":{"type":"string"},"message":{"type":"string"}}}}}}},"tags":["GPUCloudVolumes"]}}},"components":{"schemas":{"VolumeDto":{"type":"object","properties":{"_id":{"type":"string"},"name":{"type":"string"},"capacity":{"type":"number"},"availabilityZone":{"type":"string"},"region":{"type":"object"},"hourlyPrice":{"type":"number"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["_id","name","capacity","availabilityZone","region","hourlyPrice","createdAt","updatedAt"]}}}}
```

### Delete a Volume

Use this endpoint to delete volumes that are no longer needed, optimizing storage usage and reducing costs.

{% hint style="danger" %}
Ensure data backup before deleting volumes to prevent data loss.
{% endhint %}

## DELETE /gpu-cloud/volumes/{id}

>

```json
{"openapi":"3.0.0","info":{"title":"Cloud Sesterce API","version":"1.0"},"paths":{"/gpu-cloud/volumes/{id}":{"delete":{"operationId":"GPUCloudVolumesController_delete","parameters":[{"name":"x-api-key","in":"header","description":"The API Key secret should be sent through this header to authenticate the request.","required":true,"allowEmptyValue":false,"schema":{"type":"string"}},{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"204":{"description":"Volume deleted successfully"},"403":{"description":"API key invalid","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"number"},"timestamp":{"type":"string"},"path":{"type":"string"},"message":{"type":"string"}}}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"number"},"timestamp":{"type":"string"},"path":{"type":"string"},"message":{"type":"string"}}}}}}},"tags":["GPUCloudVolumes"]}}}}
```
