On a Lusor Phone, direct control with an API key uses Lusor Phone minutes. See Billing below. Your own iPhone never uses them.
Read the screen
GET …/state returns the screen’s UI element tree:
For an image instead,
GET …/screenshot takes a new screenshot and returns it as PNG bytes:
Act
Details:
- Tap. Send
indexfrom the element tree, orxandyin pixels. If you send both,indexwins. The response’sresolvedfield has the point that was tapped. - Swipe.
durationMsis 1 to 60000. - Type.
textis 1 to 8192 characters.clear: trueempties the field first. - Key.
keyCodeis an Android key code. Common ones: 66 Enter, 67 Delete, 61 Tab, 111 Escape, 19 to 22 the arrow keys. - Apps.
packageandactivitymust be dotted identifiers such ascom.android.settings. Anything else is a400. - Screenshot.
POST …/screenshotreturns the same result shape as the other actions, so it can be a step in a chain. UseGET …/screenshotfor the image itself.
ok, exit_code (0 on success) and status. ok: false means the phone could not carry it out.
capture to any action to get the screen back in the same response. See Chains and capture.
Human-like input
tap, swipe and type accept "stealth": true:
If the phone cannot do human-like input, the request returns
412 unsupported_stealth_input. It is never quietly sent as normal input.
Your own iPhone
On your own iPhone, the UI element tree is not available through the API yet:GET …/stateandtapwith anindexreturn502.- A
capturethat asks for the element tree reportscapture.failed.
GET …/screenshot and tap with { "x", "y" } coordinates instead. keyCode values and app package names are Android ones.
Billing
On a Lusor Phone, direct control with an API key uses Lusor Phone minutes, the same pool as agent runs:- The first action opens a metered window. Every further action keeps it open. The window closes 60 seconds after the last action, so a single action costs 60 seconds and a burst of actions costs its length plus 60 seconds.
- Reads count too.
GET …/stateandGET …/screenshotare metered like actions. A chain is metered before each step. - Time that overlaps an agent run on the same phone is billed once, not twice.
- Your own iPhone never uses Lusor Phone minutes.
For how minutes, credits and overages work across agent runs and direct control, see Credits and minutes.

