# Phonebox

> Cloud Android phones that AI agents can see and control, billed per second.

Phonebox gives an agent the device itself, with its screen, apps, touch and keyboard, and not a phone number. Phones park when idle and keep their apps and sign-ins. Pricing is $0.06 per phone-minute, and credits start at $10.

## Rules for agents

- Always park a phone when you're done, even when the task failed. A phone bills from the moment it exists until it parks.
- Send an `Idempotency-Key` with every create, one key for each phone you want, and repeat a create only with the same key and body.
- Send an action batch again only when Phonebox's own error says nothing ran: any error in its envelope except `500 internal_error`. After any other failure, observe the screen first.
- Treat a live view link as a credential. Whoever opens it controls the phone, and every account signed in on it, until it expires, so give it only to your user.

## Start here

- [Agent skill](https://phonebox.dev/skills/phonebox/SKILL.md): Set up and drive Phonebox from a coding agent.

- [Quickstart](https://phonebox.dev/docs-markdown/getting-started/quickstart)

- [OpenAPI specification](https://phonebox.dev/openapi.json)

- [MCP server](https://phonebox.dev/docs-markdown/interfaces/mcp)

- [Complete documentation](https://phonebox.dev/llms-full.txt)

## All pages

- [Introduction](https://phonebox.dev/docs-markdown): Phonebox gives AI agents cloud Android phones they can see and control.

- [Quickstart](https://phonebox.dev/docs-markdown/getting-started/quickstart): Set up from your terminal with one command, then create, read, control and park your first phone.

- [Set up with your coding agent](https://phonebox.dev/docs-markdown/getting-started/coding-agent): Paste one prompt into Claude Code, Codex or Cursor. Your agent signs you up from the terminal, asks what you want phones for, then helps with it.

- [Authentication and keys](https://phonebox.dev/docs-markdown/getting-started/authentication): Project API keys, the Agent, Admin and Read-only presets, scopes, keys limited to certain phones, and expiry.

- [Concepts](https://phonebox.dev/docs-markdown/getting-started/concepts): Phones, sessions, statuses, parking, timers, billing and limits.

- [Invite your team](https://phonebox.dev/docs-markdown/getting-started/team): Share a project with your team, what owners, admins and members can do, and what happens when someone leaves.

- [Lifecycle and timers](https://phonebox.dev/docs-markdown/using-phones/lifecycle): Create, wait for, start, renew, park, update and delete phones, and handle failures.

- [Observe the screen](https://phonebox.dev/docs-markdown/using-phones/observe): Read the screen as JSON or as compact text, with optional screenshots, and use snapshots to act on elements by ref.

- [Actions and targets](https://phonebox.dev/docs-markdown/using-phones/actions): Every action type, how targets find elements, the rules of a batch, and what to do when an action fails or its outcome is unknown.

- [Apps](https://phonebox.dev/docs-markdown/using-phones/apps): List, install, open and uninstall apps on a phone, your own APKs included.

- [Files](https://phonebox.dev/docs-markdown/using-phones/files): Upload, download, list and delete files in a phone's shared storage.

- [Device settings](https://phonebox.dev/docs-markdown/using-phones/device): Read a phone's device info, set its clipboard, location, locale and timezone, record its screen, and reboot or reset it.

- [Live view and human handoff](https://phonebox.dev/docs-markdown/using-phones/live-view): Create a link that lets a person watch and control a phone in the browser, for sign-ins and other steps your agent shouldn't take alone.

- [REST API](https://phonebox.dev/docs-markdown/interfaces/rest): The base URL, authentication, JSON conventions, errors, request IDs, idempotency, pagination, waiting and rate limits.

- [CLI](https://phonebox.dev/docs-markdown/interfaces/cli): Install the phonebox CLI, set its environment, and use every command, its output and its exit codes.

- [TypeScript SDK](https://phonebox.dev/docs-markdown/interfaces/sdk): Drive phones from Node.js with the phonebox package, its Phone methods, its errors, and how it retries and waits.

- [MCP](https://phonebox.dev/docs-markdown/interfaces/mcp): Connect Claude Code, Cursor or any MCP client to the hosted Phonebox server, and use its tools.

- [Agent skill](https://phonebox.dev/docs-markdown/interfaces/skill): The Phonebox skill file teaches a coding agent the whole workflow. Install it in Claude Code, or point any agent at it.

- [Conventions](https://phonebox.dev/docs-markdown/api-reference): The conventions every API request follows, from authentication and idempotency to pagination, rate limits and money, and the list of endpoints.

- [Phones](https://phonebox.dev/docs-markdown/api-reference/phones): Create, list, get, update, delete, start, park and keep phones awake, and the phone object these endpoints return.

- [Sessions](https://phonebox.dev/docs-markdown/api-reference/sessions): List a phone's billed sessions, with when each one ran, why it ended and what it cost.

- [Observe](https://phonebox.dev/docs-markdown/api-reference/observe): Read the screen as numbered elements or compact text, and take screenshots with their scale.

- [Actions](https://phonebox.dev/docs-markdown/api-reference/actions): Run a batch of actions, with every action type, target form and limit, the result format, and the errors of a batch and of each action.

- [Apps](https://phonebox.dev/docs-markdown/api-reference/apps): Search the app library, list a phone's installed apps, install apps from the library or your own APK in the background, follow the installs, and uninstall apps.

- [Uploads](https://phonebox.dev/docs-markdown/api-reference/uploads): Upload your own APK, such as the debug build your coding agent just made, so you can install it on any of your phones.

- [Files](https://phonebox.dev/docs-markdown/api-reference/files): List, upload, download and delete files in a phone's shared storage, and the rules for their paths.

- [Device](https://phonebox.dev/docs-markdown/api-reference/device): Read the phone's device info, read and set the clipboard, location, locale and timezone, and reboot or reset a phone.

- [Recordings](https://phonebox.dev/docs-markdown/api-reference/recordings): Record a phone's screen, stop the recording, list a phone's recordings, download a video and delete a recording.

- [Live](https://phonebox.dev/docs-markdown/api-reference/live): Create a link that lets a person watch and control a phone in a browser, and how long it lasts.

- [Account](https://phonebox.dev/docs-markdown/api-reference/account): Read the project's balance, reservations, monthly spending, limits, phone counts, price and the countries phones can be created in, and create a checkout link for credits.

- [Terminal setup](https://phonebox.dev/docs-markdown/api-reference/setup): The two requests a terminal or an agent makes to get an API key without the console, after a person confirms a short code in the browser.

- [Errors](https://phonebox.dev/docs-markdown/api-reference/errors): The error envelope, what next, details and retryable mean, and every code the API and the MCP server can return.

- [Test your Android build with a coding agent](https://phonebox.dev/docs-markdown/guides/test-android-builds): Install the APK your coding agent just built on a Phonebox phone in one command, check its version, then have the agent walk the new screens and report what it saw.

- [Build a multi-tenant product](https://phonebox.dev/docs-markdown/guides/multi-tenant): Give each of your end users their own phone, tag phones with metadata, limit keys to one customer's phones, and park phones between uses.

- [Keep costs down](https://phonebox.dev/docs-markdown/guides/keep-costs-down): Park phones explicitly, keep idle timeouts short, cap sessions, mind the one-minute minimum, send heartbeats only while someone watches, and set a spending limit.

- [Sign in to apps and hand off to a human](https://phonebox.dev/docs-markdown/guides/sign-in-and-handoff): Drive a sign-in with actions, hand the phone to a person with a live view link when they must enter a code or pass a check, wait for them, and park the phone signed in.

- [Pricing and credits](https://phonebox.dev/docs-markdown/billing/pricing): $0.06 per phone-minute, billed per second with a one-minute minimum, paid from prepaid credits, with reservations and a monthly spending limit.

- [Limits](https://phonebox.dev/docs-markdown/billing/limits): Every limit on phones, requests, batches, files, links and spending, what happens when you reach one, and how to ask for more.

- [Phone won't start](https://phonebox.dev/docs-markdown/troubleshooting/phone-wont-start): Why a create or start is refused, what a failed phone means, and how long a phone has to become ready.

- [Actions fail](https://phonebox.dev/docs-markdown/troubleshooting/actions-fail): What to do when a target isn't found, matches several elements or has gone stale, when there is nowhere to type, and when a wait runs out.

- [The screen reads empty](https://phonebox.dev/docs-markdown/troubleshooting/empty-screen): Why an observation can list few or no elements, how to work from screenshots and coordinates instead, and what truncated means.

- [Unknown outcomes](https://phonebox.dev/docs-markdown/troubleshooting/unknown-outcomes): What action_outcome_unknown means, why Phonebox never retries a write for you, and how to observe and decide what to do next.

- [Terms of Service](https://phonebox.dev/docs-markdown/terms): Accounts, acceptable use, payments and responsibilities.

- [Privacy Policy](https://phonebox.dev/docs-markdown/privacy): What Phonebox collects, why, and how long we keep it.

- [Cookie Policy](https://phonebox.dev/docs-markdown/cookies): The cookies and browser storage Phonebox uses, and why.