Cloud
Cloud API
REST surface of the control plane at api.phoneuse.dev.
Authentication
Two credential planes: browser sessions (email/password or Google, cookie-based) for the console, and bearer API keys for agents and the CLI. Keys are minted in the console or via POST /v1/keys/rotate and stored hashed.
Endpoints
| Method + path | Purpose |
|---|---|
| POST /v1/sandboxes | Create a phone ({ platform, ttlMs?, idleTimeoutMs? }) |
| GET /v1/sandboxes | List your phones |
| GET /v1/sandboxes/:id | One phone, including connection { endpoint, token } |
| DELETE /v1/sandboxes/:id | Close a phone |
| GET /v1/usage | Billing ledger (per-minute, written at close) |
| POST /v1/keys/rotate | Mint a fresh API key (invalidates the previous) |
| GET /v1/me | Who am I |
curl -s https://api.phoneuse.dev/v1/sandboxes \
-H "Authorization: Bearer $PHONE_USE_CLOUD_TOKEN" \
-H "content-type: application/json" \
-d '{"platform":"ios"}'Device RPC and live stream
Each running phone exposes POST <endpoint>/rpc (verbs: snapshot, press, fill, scroll, pan, installApp, …) authorized by its session token, and a WebSocket at <endpoint>/stream?token=… pushing JPEG frames for live view.