Docs
BlogHomeStart building

Source Code & Files

Get a signed download link for your source, or upload assets for the agent.


These endpoints let you download your project's source code and upload files (images, designs) for the AI agent to use as input. Both require the api-key header.

#Download Source Code

GET/api/v1/vcaas/projects/:projectId/source-codeUses credits

Get a signed URL to download the project source code.

Path parameters

ParameterTypeDescription
projectIdstringThe project ID

Response fields

FieldTypeDescription
data.filesCountnumberTotal files in project
data.lastCommitShastring | undefinedLatest git commit SHA
data.downloadUrlstring | nullSigned download URL (expires in minutes)

Example request

bash
curl -H "api-key: tlm_sk_your_key" \
  https://api-accounts.totalum.app/api/v1/vcaas/projects/my-app/source-code
Success · 200 OK
json
{
  "errors": null,
  "data": {
    "filesCount": 47,
    "lastCommitSha": "a1b2c3d",
    "downloadUrl": "https://storage.googleapis.com/..."
  }
}
Error · 402
json
{
  "errors": {
    "errorCode": "INSUFFICIENT_CREDITS",
    "errorMessage": "Not enough credits for source code download"
  },
  "data": null
}

Error codes

CodeHTTPMeaning
MISSING_PROJECT_ID400projectId is required
PROJECT_NOT_FOUND404Project does not exist or you don't own it
INSUFFICIENT_CREDITS402Not enough credits for source code download

#Upload File

POST/api/v1/vcaas/projects/:projectId/files/uploadUses credits

Upload a file to use as agent input (images, designs, etc.). Max 12MB. Send as multipart/form-data with the field file.

Path parameters

ParameterTypeDescription
projectIdstringThe project ID

Body parameters (multipart/form-data)

FieldTypeRequiredDescription
fileFileYesThe file to upload (max 12MB)

Response fields

FieldTypeDescription
data.fileNameIdstringStored file name identifier
data.urlstringSigned download URL, use in agent inputFiles

Example request

bash
curl -X POST \
  -H "api-key: tlm_sk_your_key" \
  -F "file=@./logo.png" \
  https://api-accounts.totalum.app/api/v1/vcaas/projects/my-app/files/upload
Success · 200 OK
json
{
  "errors": null,
  "data": {
    "fileNameId": "logo_abc123.png",
    "url": "https://storage.googleapis.com/..."
  }
}
Error · 400
json
{
  "errors": {
    "errorCode": "MISSING_FILE",
    "errorMessage": "file is required (multipart form field \"file\")"
  },
  "data": null
}

Error codes

CodeHTTPMeaning
MISSING_PROJECT_ID400projectId is required
PROJECT_NOT_FOUND404Project does not exist or you don't own it
MISSING_FILE400file is required (multipart form field "file")
INSUFFICIENT_CREDITS402Not enough credits for file upload
UPLOAD_FAILED500File upload failed