Docs
BlogHomeStart building

Source Code & Uploads

Take your code anywhere; give the agent your files.


The source code is yours: a standard Next.js project you can run locally or host yourself (For developers). Uploaded files are stored in the project's file storage.

#Download Source Code

GET/api/v1/vcaas/projects/:projectId/source-codeapi-key2 credits

A short-lived link to the project's current code as an archive. With the project's .env (Get Project Env) it runs locally with npm ci && npm run dev. Downloading source code is included on paid plans.

Path parameters

ParameterTypeDescription
projectIdstringThe project id

Query parameters

FieldTypeRequiredDescription
intentstringNoview when you only show the code (for example in a code viewer), which works on every plan

Response fields

FieldTypeDescription
data.filesCountnumberFiles in the archive
data.lastCommitShastring | undefinedCommit of the current version
data.downloadUrlstring | nullSigned download URL (valid a few minutes)

Example request

curl -H "api-key: tlm_sk_your_key" \
  https://builder-api.totalum.app/api/v1/vcaas/projects/barber-bookings/source-code
Success · 200 OK
json
{ "errors": null, "data": { "filesCount": 96, "lastCommitSha": "9f2c1ab4d3e5f60718293a4b5c6d7e8f90a1b2c3", "downloadUrl": "https://files.totalum.app/source/barber-bookings.tar.gz?sig=…" } }

Error codes

CodeHTTPMeaning
PLATFORM_CAPABILITY_QUOTA_REACHED403Source download is not included on your plan (upgradePlan says which is needed)
INSUFFICIENT_CREDITS402Not enough credits
End of Download Source CodeNext endpointPOSTUpload File

#Upload File

POST/api/v1/vcaas/projects/:projectId/files/uploadapi-keyFree

Upload one file (up to 20 MB) as multipart/form-data with the field file. Use the returned url in inputFiles of Run AI Agent. For a bigger file, pass its own public URL in inputFiles instead; no upload is needed.

Path parameters

ParameterTypeDescription
projectIdstringThe project id

Body parameters(multipart/form-data)

FieldTypeRequiredDescription
filefileYesThe file, up to 20 MB
privatestringNo"true" = stored privately (served only through signed links)

Response fields

FieldTypeDescription
data.fileNameIdstringThe stored file's key
data.urlstringIts URL (for inputFiles)
data.privateboolean | undefinedtrue for a private file

Example request

curl -X POST \
  -H "api-key: tlm_sk_your_key" \
  -F "file=@./logo.png" \
  https://builder-api.totalum.app/api/v1/vcaas/projects/barber-bookings/files/upload
Success · 200 OK
json
{ "errors": null, "data": { "fileNameId": "uploads/01k6y1-logo.png", "url": "https://files.totalum.app/barber-bookings/uploads/01k6y1-logo.png" } }

Error codes

CodeHTTPMeaning
MISSING_FILE400No multipart field file
FILE_TOO_LARGE413Over 20 MB — pass the file's own URL in inputFiles instead
RATE_LIMITED429More than 300 uploads a minute
End of Upload File Back to top