Quickstart: Android
Start an Android sandbox, see its screen, act on it and run a command
Written ahead of the API
Some calls on this page are written from Pod's design and are not in the API yet. Their paths and fields may change.
Not available yet Android sandboxes are not offered yet. Linux sandboxes are.
Not available yet Seeing and acting on a sandbox's screen is not offered yet. Commands, files and ports work today.
This guide starts an Android sandbox, takes a screenshot, sends one action and runs a command, with your API key and nothing else. The cURL steps need curl, jq and uuidgen.
Make a key
Sign in to the dashboard, open Keys and make a test key. It starts pod_test_, and a test key sees only test sandboxes. The key is shown once: keep it in your environment.
export POD_API_KEY=pod_test_…Start a sandbox
Ask for an Android sandbox. The call waits until it is running, then answers it; with a snapshot ready it takes seconds.
SANDBOX=$(curl -s -X POST "https://api.pod.mapier.ai/v1/sandboxes" \
-H "Authorization: Bearer $POD_API_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{"system":"android"}' | jq -r .id)
echo $SANDBOXIt prints the sandbox's id, such as sbx_3ahrz6dmv29gqy5ckt18fpx4b. Building for your own users? Add "end_user" to label the sandbox with one of them; Your users shows how. See Create a sandbox for every option.
See its screen
Take a screenshot. It answers the home screen as a PNG, base64 in JSON, the way model APIs take an image.
curl -s "https://api.pod.mapier.ai/v1/sandboxes/$SANDBOX/screen/screenshot" \
-H "Authorization: Bearer $POD_API_KEY" | jq -r .image | base64 -d > screen.pngAct on it
Send one action. This one taps the app drawer, at (540, 1800) in screen pixels. Take another screenshot to see what changed.
curl -X POST "https://api.pod.mapier.ai/v1/sandboxes/$SANDBOX/screen/actions" \
-H "Authorization: Bearer $POD_API_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{"actions":[{"type":"click","x":540,"y":1800}]}'An agent works in this loop: look at the screen, choose an action, send it, look again. A model's own computer-use actions (OpenAI's, Anthropic's, Gemini's) go through screen.actAs (act_as in Python), which converts them.
Run a command
Commands run in Android's shell. Their output streams back over a WebSocket, which the SDKs and mpod open for you.
const { stdout } = await sandbox.run("getprop ro.build.version.release");
console.log(stdout);With plain HTTP, Run a command in a sandbox answers the stream's address; that page covers standard input and commands that keep running.
Delete it
A sandbox is billed by the second while it runs. Delete it when you are done, or let it sleep: it sleeps by itself after 15 minutes with no activity.
curl -X DELETE "https://api.pod.mapier.ai/v1/sandboxes/$SANDBOX" \
-H "Authorization: Bearer $POD_API_KEY" \
-H "Idempotency-Key: $(uuidgen)"