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. Absent on a legacy project — see below
data.downloadUrlstring | nullSigned download URL (expires in minutes). Absent on a legacy project — see below
data.modestring | undefinedPresent only on a legacy project, where it is the literal "mongodb" and there is no archive to download
A legacy project answers with a count and no download

Source code is served from a git archive, and that is what the fields above describe. A small number of older projects still hold their code the original way, and for those the response is only { "mode": "mongodb", "filesCount": N } — no downloadUrl, no lastCommitSha.

So branch on data.mode: if it is "mongodb", there is nothing to download, and the code is reachable through Get Project Tree and Get File Content instead. Every project created through this API is on the archive path.

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
End of Download Source CodeNext endpointPOSTUpload File

#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
End of Upload File Back to top