AI agents

One action, then wait until the screen stops changing

post/devices/{name}/act

Request

  • Base URL: https://api.clousd.com/v1
  • URL: https://api.clousd.com/v1/devices/{name}/act
  • Auth: HTTP bearer

Request body

op'tap' | 'long_press' | 'swipe' | 'scroll' | 'text' | 'key' | 'open_app' | 'close_app' | 'url' | 'intent' | 'settings' | 'screen_text' | 'find_text' | 'tap_text' | 'wait_text' | 'installed' | 'clipboard_get' | 'clipboard_set' | 'notifications' | 'notifications_open' | 'notifications_close' | 'notifications_clear' | 'app_info' | 'crashes' | 'health' required

Read-only ops (installed, screen_text, find_text, wait_text, clipboard_get, notifications, app_info, crashes, health) do not change the observation seq. clipboard_get, notifications, app_info, crashes and health return their result as JSON in data.

xinteger

phone pixels

yinteger
x2integer
y2integer
msinteger

swipe duration; for wait_text the timeout in ms (max 120000)

textstring

text to type (any language), text to find, scroll direction (down|up)

keystring

home, back, recents, enter, power, tab, del, menu, volume_up, volume_down, wake, sleep or a keycode

packagestring
urlstring
fxnumber

x as a fraction of the screen width (0..1) instead of pixels (tap, swipe, long_press)

fynumber
settleboolean

wait for two identical frames in a row (up to 5 s)

seqinteger

seq of the observation this action is based on

Example request

{
  "intent": {
    "action": "android.intent.action.VIEW",
    "component": "com.android.settings/.Settings"
  }
}

Response

OK

okboolean
outputstring
seqinteger

screen state after this action (pass it to the next act to chain without observing)

settledboolean

two identical frames that differ from the frame before the action

changedboolean

false - the screen did not change at all (the action probably missed)

waited_msinteger

Changes

No recorded changes to this operation across all 1 revision of this API.