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
/api/v1/vcaas/projects/:projectId/source-codeUses creditsGet a signed URL to download the project source code.
Path parameters
| Parameter | Type | Description |
|---|---|---|
projectId | string | The project ID |
Response fields
| Field | Type | Description |
|---|---|---|
data.filesCount | number | Total files in project |
data.lastCommitSha | string | undefined | Latest git commit SHA. Absent on a legacy project — see below |
data.downloadUrl | string | null | Signed download URL (expires in minutes). Absent on a legacy project — see below |
data.mode | string | undefined | Present only on a legacy project, where it is the literal "mongodb" and there is no archive to 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
curl -H "api-key: tlm_sk_your_key" \
https://api-accounts.totalum.app/api/v1/vcaas/projects/my-app/source-code{
"errors": null,
"data": {
"filesCount": 47,
"lastCommitSha": "a1b2c3d",
"downloadUrl": "https://storage.googleapis.com/..."
}
}{
"errors": {
"errorCode": "INSUFFICIENT_CREDITS",
"errorMessage": "Not enough credits for source code download"
},
"data": null
}Error codes
| Code | HTTP | Meaning |
|---|---|---|
MISSING_PROJECT_ID | 400 | projectId is required |
PROJECT_NOT_FOUND | 404 | Project does not exist or you don't own it |
INSUFFICIENT_CREDITS | 402 | Not enough credits for source code download |
#Upload File
/api/v1/vcaas/projects/:projectId/files/uploadUses creditsUpload a file to use as agent input (images, designs, etc.). Max 12MB. Send as multipart/form-data with the field file.
Path parameters
| Parameter | Type | Description |
|---|---|---|
projectId | string | The project ID |
Body parameters(multipart/form-data)
| Field | Type | Required | Description |
|---|---|---|---|
file | File | Yes | The file to upload (max 12MB) |
Response fields
| Field | Type | Description |
|---|---|---|
data.fileNameId | string | Stored file name identifier |
data.url | string | Signed download URL, use in agent inputFiles |
Example request
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{
"errors": null,
"data": {
"fileNameId": "logo_abc123.png",
"url": "https://storage.googleapis.com/..."
}
}{
"errors": {
"errorCode": "MISSING_FILE",
"errorMessage": "file is required (multipart form field \"file\")"
},
"data": null
}Error codes
| Code | HTTP | Meaning |
|---|---|---|
MISSING_PROJECT_ID | 400 | projectId is required |
PROJECT_NOT_FOUND | 404 | Project does not exist or you don't own it |
MISSING_FILE | 400 | file is required (multipart form field "file") |
INSUFFICIENT_CREDITS | 402 | Not enough credits for file upload |
UPLOAD_FAILED | 500 | File upload failed |
