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/volumesReturns a paginated list of your volumes.
Query Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
limit | integer | 20 | Items per page (1-100) |
cursor | string | - | 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/:idRetrieves volume details including current version information.
Path Parameters
| Parameter | Type | Description |
|---|---|---|
id | string | Volume 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/versionsReturns a paginated list of all versions for a volume.
Path Parameters
| Parameter | Type | Description |
|---|---|---|
id | string | Volume 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/downloadReturns a 302 redirect to a presigned URL for downloading the volume as a tar.gz archive.
Path Parameters
| Parameter | Type | Description |
|---|---|---|
id | string | Volume ID |
Query Parameters
| Parameter | Type | Description |
|---|---|---|
versionId | string | Specific 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.gzResponse
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.gzVolume Object
| Field | Type | Description |
|---|---|---|
id | string | Unique volume identifier (prefix: vol_) |
name | string | Volume name |
currentVersionId | string | ID of the current version |
size | integer | Total size in bytes |
fileCount | integer | Number of files |
createdAt | string | ISO 8601 creation timestamp |
updatedAt | string | ISO 8601 last update timestamp |
Version Object
| Field | Type | Description |
|---|---|---|
id | string | Unique version identifier |
volumeId | string | Parent volume ID |
size | integer | Version size in bytes |
fileCount | integer | Number of files in version |
message | string | Commit message |
createdBy | string | User who created the version |
createdAt | string | ISO 8601 creation timestamp |