Engineering

API keys, scopes, and the prepaid USD wallet explained

Rachel Kim||5 min
+K

Every Coasty Computer Use API request needs a key and a wallet. If you skip scoped keys or mismanage credits, you risk accidental quota bloat or failed runs. This guide shows how to create keys with specific permissions and how to top up a prepaid USD wallet so your agents keep running.

API keys and scopes

You generate keys from the Coasty dashboard at https://coasty.ai/developers/keys. Keys are scoped by the scopes field in key metadata. Valid scopes include read, write, and machine provisioning. A key without a proper scope triggers a 403 INSUFFICIENT_SCOPE error when you try to use an endpoint outside its permission set.

Create a scoped key

  • Navigate to https://coasty.ai/developers/keys
  • Create a new key and assign one or more scopes
  • Copy the generated key immediately, refreshing clears it from the screen
  • Store the key in your environment as COASTY_API_KEY to avoid hardcoding

Prepaid USD wallet

Coasty uses a prepaid USD wallet. One credit equals $0.01. You add funds to the wallet, then spend credits on specific operations. This lets you cap spend via hard budget guards in workflows or task runs. If credits run out, the system returns a 402 INSUFFICIENT_CREDITS error on any write operation, including creating machines, starting workflows, or triggering predictions.

Billing behavior by operation

  • Vision predictions: $0.05 per POST /v1/predict
  • Stateful session predictions: $0.04 per POST /v1/sessions/{id}/predict
  • Grounding: $0.03 per POST /v1/ground
  • Parse (pyautogui to actions): free
  • Task runs: $0.05 per agent step via POST /v1/runs
  • Machine provisioning: consumes credits on POST /v1/machines
bash
curl -X GET https://coasty.ai/v1/runs \
  -H "X-API-Key: ${COASTY_API_KEY}" \
  -H "Idempotency-Key: run-list-$(date +%s)"

Use scoped keys so every token has only the permissions it needs, and top up the prepaid USD wallet to guarantee your agents keep running.

Where this beats brittle automation

Traditional automation relies on brittle selectors and fixed API endpoints. A key with insufficient scope or no wallet credit halts execution immediately, giving you a clear signal to adjust permissions or funding. This visibility prevents silent failures and lets you enforce hard budget caps in workflows. The computer use API sees the screen and acts like a human, but the key and wallet give you programmatic control over who can act and how much it costs.

Now you can confidently scope your keys and monitor your prepaid USD wallet to keep your computer use agents running reliably. Start building at https://coasty.ai/developers to get your key.

Want to see this in action?

View Case Studies
Try Coasty Free