VM0VM0
ReferenceAPI Reference

Volumes

Input storage retrieval endpoints

Volumes provide input storage for agents. Use these endpoints to list and retrieve data files, configuration, or other resources that agents need during execution.

List Volumes

GET /v1/volumes

Returns a paginated list of your volumes.

Query Parameters

ParameterTypeDefaultDescription
limitinteger20Items per page (1-100)
cursorstring-Pagination cursor

Request

curl https://api.vm0.ai/v1/volumes \
  -H "Authorization: Bearer vm0_live_xxx"

Response

{
  "data": [
    {
      "id": "vol_abc123",
      "name": "training-data",
      "currentVersionId": "v1_xyz789",
      "size": 1048576,
      "fileCount": 10,
      "createdAt": "2024-01-15T00:00:00Z",
      "updatedAt": "2024-01-15T10:30:00Z"
    }
  ],
  "pagination": {
    "hasMore": false,
    "nextCursor": null
  }
}

Get Volume

GET /v1/volumes/:id

Retrieves volume details including current version information.

Path Parameters

ParameterTypeDescription
idstringVolume ID

Request

curl https://api.vm0.ai/v1/volumes/vol_abc123 \
  -H "Authorization: Bearer vm0_live_xxx"

Response

{
  "id": "vol_abc123",
  "name": "training-data",
  "currentVersionId": "v1_xyz789",
  "size": 1048576,
  "fileCount": 10,
  "currentVersion": {
    "id": "v1_xyz789",
    "volumeId": "vol_abc123",
    "size": 1048576,
    "fileCount": 10,
    "message": "Added new dataset",
    "createdBy": "user_abc",
    "createdAt": "2024-01-15T10:30:00Z"
  },
  "createdAt": "2024-01-15T00:00:00Z",
  "updatedAt": "2024-01-15T10:30:00Z"
}

List Volume Versions

GET /v1/volumes/:id/versions

Returns a paginated list of all versions for a volume.

Path Parameters

ParameterTypeDescription
idstringVolume ID

Request

curl https://api.vm0.ai/v1/volumes/vol_abc123/versions \
  -H "Authorization: Bearer vm0_live_xxx"

Response

{
  "data": [
    {
      "id": "v1_xyz789",
      "volumeId": "vol_abc123",
      "size": 1048576,
      "fileCount": 10,
      "message": "Added new dataset",
      "createdBy": "user_abc",
      "createdAt": "2024-01-15T10:30:00Z"
    }
  ],
  "pagination": {
    "hasMore": false,
    "nextCursor": null
  }
}

Download Volume

GET /v1/volumes/:id/download

Returns a 302 redirect to a presigned URL for downloading the volume as a tar.gz archive.

Path Parameters

ParameterTypeDescription
idstringVolume ID

Query Parameters

ParameterTypeDescription
versionIdstringSpecific version (defaults to current)

Request

curl -L "https://api.vm0.ai/v1/volumes/vol_abc123/download" \
  -H "Authorization: Bearer vm0_live_xxx" \
  -o volume.tar.gz

Response

Returns 302 Found with a Location header pointing to the presigned download URL.

HTTP/1.1 302 Found
Location: https://storage.example.com/presigned-url-for-archive.tar.gz

Volume Object

FieldTypeDescription
idstringUnique volume identifier (prefix: vol_)
namestringVolume name
currentVersionIdstringID of the current version
sizeintegerTotal size in bytes
fileCountintegerNumber of files
createdAtstringISO 8601 creation timestamp
updatedAtstringISO 8601 last update timestamp

Version Object

FieldTypeDescription
idstringUnique version identifier
volumeIdstringParent volume ID
sizeintegerVersion size in bytes
fileCountintegerNumber of files in version
messagestringCommit message
createdBystringUser who created the version
createdAtstringISO 8601 creation timestamp