A computer use API gives your agent the power to click, type, and navigate real desktops. But if that key is public, anyone can burn your credits. Scopes let you lock down which resources a key can touch. The prepaid USD wallet ensures you pay only for what you actually use. This guide shows you how to set up scoped keys, read them safely, and manage your balance.
API key basics
Keys live in your account at https://coasty.ai/developers/keys . You never hardcode them. Read them from the COASTY_API_KEY environment variable. Use the key in the Authorization header as a Bearer token. This works for every endpoint, including task runs, workflows, and machine provisioning.
export COASTY_API_KEY=sk_live_1234567890abcdef
# Example: list runs with a scoped key
curl -s https://coasty.ai/v1/runs \
-H "Authorization: Bearer $COASTY_API_KEY" | jq .Scopes control access
- Scopes gate which operations a key can perform. Valid scopes include reads, writes, billing, and specific endpoints like /v1/runs or /v1/machines.
- When you create a key, assign only the minimum scopes you need. A read-only scope prevents accidental credit burns.
- Requests without permission return a 403 INSUFFICIENT_SCOPE error with an error object that contains code, message, and request_id.
Prepaid USD wallet
Credits are prepaid in USD. One credit equals one cent. You top up your wallet before you start using the computer use API. Charges appear when you submit requests that incur a cost. For example, a task run costs $0.05 per agent step. Your wallet balance is deducted automatically when the run completes.
Read COASTY_API_KEY from the environment, use it as a Bearer token, and assign scoped permissions to protect your wallet.
Where this beats brittle automation
Traditional automation relies on brittle selectors and fixed API endpoints. If a UI changes, your script breaks. A computer use agent sees the screen and acts like a human, adapting to layouts and dynamic content. Scopes keep that agent confined to your intended resources, while the prepaid wallet lets you scale without surprise bills.
Secure your computer use API with scoped keys and manage your prepaid wallet. Build reliable, adaptive agents that work on real desktops. Get your key at https://coasty.ai/developers.
Want to see this in action?
View Case Studies