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

# Get & List a Volume

Use the `novita.volume` methods to look up a single volume or list all volumes in your account. Both return volume metadata such as ID, name, quota, and usage.

***

## Get a volume

`novita.volume.getInfo()` (JS) / `novita.volume.get_info()` (Python) returns information about a single volume by its ID, including its access `token`. If the volume does not exist, a not-found error is raised.

<CodeGroup>
  ```js JavaScript & TypeScript icon="js" theme={"system"}
  import { Novita } from 'novita-sandbox'

  const novita = new Novita()

  const info = await novita.volume.getInfo('vol_123')
  console.log(info.volumeId, info.name)
  console.log('quota:', info.quotaSizeGiB, 'GiB,', info.quotaInodes, 'inodes')
  console.log('token:', info.token)
  ```

  ```python Python icon="python" theme={"system"}
  from novita_sandbox import Novita

  novita = Novita()

  info = novita.volume.get_info("vol_123")
  print(info.volume_id, info.name)
  print("quota:", info.quota_size_gib, "GiB,", info.quota_inodes, "inodes")
  print("token:", info.token)
  ```

  ```bash CLI icon="terminal" theme={"system"}
  novita volume get <volume_id>
  ```
</CodeGroup>

## List volumes

`novita.volume.list()` returns all volumes in your account as a list of volume info (without the token).

<CodeGroup>
  ```js JavaScript & TypeScript icon="js" theme={"system"}
  import { Novita } from 'novita-sandbox'

  const novita = new Novita()

  const volumes = await novita.volume.list()
  for (const vol of volumes) {
    console.log(`${vol.volumeId}  ${vol.name}  ${vol.quotaSizeGiB} GiB`)
  }
  ```

  ```python Python icon="python" theme={"system"}
  from novita_sandbox import Novita

  novita = Novita()

  volumes = novita.volume.list()
  for vol in volumes:
      print(f"{vol.volume_id}  {vol.name}  {vol.quota_size_gib} GiB")
  ```

  ```bash CLI icon="terminal" theme={"system"}
  novita volume list

  # JSON output
  novita volume list --output json
  ```
</CodeGroup>
