Account
Check your current credit balance and what each operation costs.
The Totalum API is a REST API for programmatically building, deploying, and managing projects.
- Base URL:
https://api-accounts.totalum.app - Authentication: every request must include the header
api-key: <your-api-key>(keys are prefixedtlm_sk_). - Response envelope: every response is shaped as
{ "errors": null | { "errorCode": "...", "errorMessage": "..." }, "data": ... }.
Keep your API key secret — it must never leave your backend server. Never call the Totalum API directly from frontend code.
#Get Account Info
/api/v1/vcaas/accountFreeRetrieve your current credit balance and account details.
Response fields
| Field | Type | Description |
|---|---|---|
data.credits | number | Total spendable balance — recurrentCredits + oneTimeCredits. This is the number to check before an operation |
data.recurrentCredits | number | undefined | Monthly plan credits remaining. Reset at the start of each billing period. 0 on accounts with no plan credits |
data.oneTimeCredits | number | undefined | Purchased credits remaining. These never expire |
data.credits is the only figure you need to gate a call — it is already the sum of both pools. The breakdown is informational: plan credits are consumed first, so purchased credits are what remains once the monthly allowance runs out. Accounts created before plan credits existed report the whole balance under oneTimeCredits.
Example request
curl -H "api-key: tlm_sk_your_key" \
https://api-accounts.totalum.app/api/v1/vcaas/account{
"errors": null,
"data": {
"credits": 425,
"recurrentCredits": 100,
"oneTimeCredits": 325
}
}{
"errors": {
"errorCode": "GET_ACCOUNT_ERROR",
"errorMessage": "Internal error fetching account info"
},
"data": null
}Error codes
| Code | HTTP | Meaning |
|---|---|---|
GET_ACCOUNT_ERROR | 400 | Internal error fetching account info |
#Get Credit Costs
/api/v1/vcaas/credit-costsFreeRetrieve the current price, in development credits, of every fixed-cost operation. Read it at runtime instead of hard-coding prices: it is the same table the API charges against, so a price change reaches your app without a release.
Only operations with a flat price appear here. Running the AI agent is not one of them — a prompt costs between roughly 2 and 30 credits depending on how much work it turns out to be, so it has no entry to publish. Infrastructure credits (ChatGPT, image generation, emails, PDFs and the rest) are likewise usage-based and are not listed. Every endpoint not named here is free.
Response fields
| Field | Type | Description |
|---|---|---|
data.creditCosts | object | Map of operation name to its cost in development credits |
data.creditCosts.CREATE_PROJECT | number | Creating a project |
data.creditCosts.CREATE_DEPLOYMENT | number | Deploying to production |
data.creditCosts.START_SERVER | number | Starting or restarting the dev server |
data.creditCosts.GET_SOURCE_CODE | number | Downloading the full source archive |
data.creditCosts.RECOVER_VERSION | number | Recovering a previous version |
data.creditCosts.UPLOAD_FILE | number | Uploading a file to the project |
data.creditCosts.ADD_CUSTOM_DOMAIN | number | Attaching a custom domain |
data.creditCosts.EXPORT_PROJECT | number | Exporting a project |
data.creditCosts.IMPORT_PROJECT | number | Importing a project |
data.creditCosts.UPDATE_FILE | number | Writing one file through the project-files API |
data.creditCosts.REBUILD_PROJECT | number | Rebuilding the project after file writes |
Example request
curl -H "api-key: tlm_sk_your_key" \
https://api-accounts.totalum.app/api/v1/vcaas/credit-costs{
"errors": null,
"data": {
"creditCosts": {
"CREATE_PROJECT": 1,
"CREATE_DEPLOYMENT": 1,
"START_SERVER": 3,
"GET_SOURCE_CODE": 1,
"RECOVER_VERSION": 2,
"UPLOAD_FILE": 0.5,
"ADD_CUSTOM_DOMAIN": 2,
"EXPORT_PROJECT": 2,
"IMPORT_PROJECT": 6,
"UPDATE_FILE": 0.1,
"REBUILD_PROJECT": 1
}
}
}Browsing the project tree and reading file contents are deliberately free — an editor opens a tree and then a dozen files, and metering that would make the API unusable for the thing it exists for. A write is a real mutation (it writes to the sandbox, commits, snapshots a version and may push to GitHub) but is priced at 0.1 so that saving a component and its two imports does not cost as much as creating a project. A rebuild keeps its full price because it burns a sandbox CPU for minutes.
{
"errors": {
"errorCode": "GET_CREDIT_COSTS_ERROR",
"errorMessage": "Error getting credit costs"
},
"data": null
}Error codes
| Code | HTTP | Meaning |
|---|---|---|
GET_CREDIT_COSTS_ERROR | 400 | Internal error fetching credit costs |
