Cloud computers and credits (Casama Link)
Run your own Casama server, but let Casama Cloud host the bots' computers or pay for the model calls. A Casama Link key from a Casama Cloud workspace gives your server both, billed to that workspace's credits.
This is the paid half of Casama Link. The free half, an address your phone can reach plus notifications, is on Use your server on your phone. See the Casama Link overview for how the two fit together.
How it works
- A workspace owner or admin creates a Casama Link key in Casama Cloud, named after your server.
- Your server uses that key to create computers on Casama Cloud and to call models through it.
- Computer time and model calls show on the cloud workspace's bill under your server's name, and are paid from its credits.
Everything else (your bots, chats, memory, files and data) stays on your server.
1. Create a key in Casama Cloud
You need to be an owner or admin of the cloud workspace.
- In the Casama Cloud app, open Settings → Billing.
- Open Charges by server, Casama Link servers and keys.
- Under Casama Link, choose New Casama Link Key.
- Enter a Server name, such as
home-server, and choose Create. - Copy the key. It starts with
kcc_and is shown only once.
A key from the app can use both computers and models. Through the API you can pick what a key may do with scopes on POST /v1/orgs/{id}/link/keys:
| Scope | Lets the server | Spends credits |
|---|---|---|
computers | Create and use computers on Casama Cloud | Yes |
models | Call models through Casama Cloud | Yes |
remote_access | Hold a casama.link address | No |
push | Send notifications to the store apps | No |
A key made by linking (casama selfhost remote on, or Use on Your Phone in the app) has only remote_access and push.
2. Configure your server
Add both values to infra/compose/.env:
CASAMA_CLOUD_URL=https://api.casama.ai
CASAMA_CLOUD_KEY=kcc_...Then run casama selfhost up. The API and worker now offer a computer provider named casama-cloud.
One key per server
A server holds one CASAMA_CLOUD_KEY. To use cloud computers or credits and remote access together, create the key through the API with all four scopes, set it in .env, then run casama selfhost remote on, which keeps a key that can already hold an address. Linking again replaces the key with one that can't spend credits.
3. Use cloud computers
Create a computer with the provider casama-cloud through the API:
POST /v1/computers
Content-Type: application/json
{ "org_id": "<workspace id>", "name": "Cloud computer", "kind": "team", "provider": "casama-cloud" }The computer runs on Casama Cloud, and bots use it like any other computer: shell, files, browser, sleep and wake. If the server has no CASAMA_CLOUD_KEY, the request fails with link_cloud_off. If the key lacks the computers scope, Casama Cloud refuses with computers_unavailable. See API and Computers.
4. Use model credits
Add an OpenRouter model key that points at Casama Cloud, with the Casama Link key as the API key:
casama credential add --provider openrouter --label "Casama Cloud" \
--base-url https://api.casama.ai/link/v1/models \
--key kcc_...Then pick that key and a model in a bot's settings. Casama Cloud passes the calls to its own model provider (OpenRouter by default) and bills the cost that provider reports.
Billing
| What | How it's billed |
|---|---|
| Cloud computer time | Per hour, from create or wake until sleep or delete |
| Model calls | The provider's reported cost, with Casama Cloud's markup |
Usage appears on the cloud workspace's Billing screen with your server's name, and is deducted from its credits. When the credits run out, new computers, wake-ups, commands and model calls are refused with out_of_credits until credits are added. Model calls also stop for the day when the workspace reaches its daily limit for model credits. See Usage, budgets and plans.
Revoke a key
- In Casama Cloud, open Settings → Billing, then Charges by server, Casama Link servers and keys.
- Under Casama Link, choose the delete icon next to the server.
- Confirm Revoke.
That server stops using cloud computers and credits right away. If the key also held an address, the address is removed too.
Limits
- Live view and terminals for cloud computers aren't available through Casama Link. Bots can still use the computer.
- The app has no option to pick the
casama-cloudprovider when creating a computer. Use the API. - The app's model key form shows Base URL only for an OpenAI-compatible server, so add the OpenRouter key with the CLI or the API.
- A cloud computer belongs to the cloud workspace that first created it. Other cloud workspaces can't use it.