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 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 |
data.downloadUrl | string | null | Signed download URL (expires in minutes) |
Example request
curl -H "api-key: tlm_sk_your_key" \
https://api-accounts.totalum.app/api/v1/vcaas/projects/my-app/source-codeSuccess · 200 OK
{
"errors": null,
"data": {
"filesCount": 47,
"lastCommitSha": "a1b2c3d",
"downloadUrl": "https://storage.googleapis.com/..."
}
}Error · 402
{
"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
POST
/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/uploadSuccess · 200 OK
{
"errors": null,
"data": {
"fileNameId": "logo_abc123.png",
"url": "https://storage.googleapis.com/..."
}
}Error · 400
{
"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 |
