VM0VM0
ReferenceAPI Reference

Artifacts

Output storage retrieval endpoints

Artifacts provide output storage for agents. Use these endpoints to list and retrieve work products created by agents during execution.

List Artifacts

GET /v1/artifacts

Returns a paginated list of your artifacts.

Query Parameters

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

Request

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

Response

{
  "data": [
    {
      "id": "art_abc123",
      "name": "research-output",
      "currentVersionId": "v1_xyz789",
      "size": 524288,
      "fileCount": 5,
      "createdAt": "2024-01-15T00:00:00Z",
      "updatedAt": "2024-01-15T10:30:00Z"
    }
  ],
  "pagination": {
    "hasMore": false,
    "nextCursor": null
  }
}

Get Artifact

GET /v1/artifacts/:id

Retrieves artifact details including current version information.

Path Parameters

ParameterTypeDescription
idstringArtifact ID

Request

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

Response

{
  "id": "art_abc123",
  "name": "research-output",
  "currentVersionId": "v1_xyz789",
  "size": 524288,
  "fileCount": 5,
  "currentVersion": {
    "id": "v1_xyz789",
    "artifactId": "art_abc123",
    "size": 524288,
    "fileCount": 5,
    "message": "Research complete",
    "createdBy": "agent_run_abc",
    "createdAt": "2024-01-15T10:30:00Z"
  },
  "createdAt": "2024-01-15T00:00:00Z",
  "updatedAt": "2024-01-15T10:30:00Z"
}

List Artifact Versions

GET /v1/artifacts/:id/versions

Returns a paginated list of all versions for an artifact.

Path Parameters

ParameterTypeDescription
idstringArtifact ID

Request

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

Response

{
  "data": [
    {
      "id": "v1_xyz789",
      "artifactId": "art_abc123",
      "size": 524288,
      "fileCount": 5,
      "message": "Research complete",
      "createdBy": "agent_run_abc",
      "createdAt": "2024-01-15T10:30:00Z"
    }
  ],
  "pagination": {
    "hasMore": false,
    "nextCursor": null
  }
}

Download Artifact

GET /v1/artifacts/:id/download

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

Path Parameters

ParameterTypeDescription
idstringArtifact ID

Query Parameters

ParameterTypeDescription
versionIdstringSpecific version (defaults to current)

Request

curl -L "https://api.vm0.ai/v1/artifacts/art_abc123/download" \
  -H "Authorization: Bearer vm0_live_xxx" \
  -o artifact.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

Artifact Object

FieldTypeDescription
idstringUnique artifact identifier (prefix: art_)
namestringArtifact 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
artifactIdstringParent artifact ID
sizeintegerVersion size in bytes
fileCountintegerNumber of files in version
messagestringCommit message
createdBystringUser or agent that created the version
createdAtstringISO 8601 creation timestamp