Clousd API reference.
Every route of the Clousd API v1, 78 operations, grouped the way you will use them. Parameters, request bodies and responses are in the OpenAPI file.
Every request
# base URL https://api.clousd.com/v1 # header Authorization: Bearer cl_live_your_key # errors are JSON { "error": "busy", "message": "…" }
All routes.
Basics
| What | Value | Notes |
|---|---|---|
| Base URL | https://api.clousd.com/v1 | HTTPS only, JSON in and out |
| Authentication | Authorization: Bearer cl_live_… | Keys are made in the dashboard, scoped to read or control and to a list of devices |
| Long operations | 202 Accepted → GET /v1/jobs/{id} | Create, start, restore and similar calls return a job to poll |
| Errors | { "error": "busy", "message": "…" } | A short code to branch on and a message for people |
| Full specification | openapi-v1.yaml | OpenAPI 3.1 with parameters, bodies and responses |
Tasks
| Method | Route | What it does |
|---|---|---|
| GET | /v1/schedules | Schedules of this key |
| POST | /v1/schedules | A task that runs by itself - daily, hourly or when you call it |
| POST | /v1/schedules/{id}/toggle | Pause or resume a schedule |
| POST | /v1/schedules/{id}/delete | Delete a schedule |
| POST | /v1/runs | Give one phone or several a task in plain words |
| GET | /v1/runs | Runs of this key, newest first |
| GET | /v1/runs/{id} | One run - status, answer, structured_output, the card it waits on |
| DELETE | /v1/runs/{id} | Delete a finished run with its steps and screenshots |
| GET | /v1/runs/{id}/events | Live events as Server-Sent Events |
| GET | /v1/runs/{id}/trajectory | Every step - tool, target, result, whether the screen was kept |
| GET | /v1/runs/{id}/steps/{n}.jpg | The screen before step n |
| POST | /v1/runs/{id}/answer | Answer the run's card - a question (answer) or a permission (allow / decline) |
| POST | /v1/runs/{id}/message | Tell the running agent something; it reads it before its next step |
| POST | /v1/runs/{id}/cancel | Stop the run |
| POST | /v1/schedules/{id}/run | Start a schedule now - the trigger for trigger=api |
| GET | /v1/credentials | Saved logins - package, name and which fields are set; values are never returned |
| POST | /v1/credentials | Save a login for an app |
| POST | /v1/credentials/{id}/fields | Set one field of a login |
| DELETE | /v1/credentials/{id}/fields/{type} | Remove one field of a login |
| DELETE | /v1/credentials/{id} | Delete a login |
Devices
| Method | Route | What it does |
|---|---|---|
| GET | /v1/devices | Devices this key can see |
| POST | /v1/devices | Create a device (charged to the account of the API key) |
| GET | /v1/devices/{name} | One device |
| DELETE | /v1/devices/{name} | Delete the device: it moves to Trash for 14 days (not running, not billed) and can be restored; forever=1 deletes it with its data at once. On an account that has never paid, the device is always deleted at once. |
| POST | /v1/devices/{name}/start | Start the device |
| POST | /v1/devices/{name}/stop | Stop the device (state is kept; a stopped device costs nothing) |
| POST | /v1/devices/{name}/restart | Restart the device |
| GET | /v1/devices/{name}/ice | ICE servers for a WebRTC viewer of this device: the TURN of the device's host with a temporary credential (read key is enough) |
| GET | /v1/devices/{name}/quality | Quality by category (last measurement) |
| GET | /v1/android | Android versions you can create devices on |
| GET | /v1/trash | Devices in Trash, with when each one is deleted for good |
| POST | /v1/trash/{name}/restore | Bring a device back from Trash as a stopped device (start it when you need it) |
| POST | /v1/devices/{name}/reset | Reset the device to a fresh state: apps and data are wiped, the phone comes back like new (same Android version, 1-5 min) |
| GET | /v1/devices/{name}/screenrecord | Record the screen for a few seconds |
| POST | /v1/devices/{name}/label | Give a phone a name people and agents can tell apart ("QA team"); empty = back to "Phone #N" |
| GET | /v1/balance | The account's money - balance, spend per day, hours left, renewals and warnings to show the user |
AI agents
| Method | Route | What it does |
|---|---|---|
| GET | /v1/devices/{name}/observe | A fresh look at the phone - screenshot, UI tree and the app on screen in one call |
| POST | /v1/devices/{name}/act | One action, then wait until the screen stops changing |
| POST | /v1/devices/{name}/op | One core primitive (the Lusiesta core protocol, one to one) |
Screen and input
| Method | Route | What it does |
|---|---|---|
| GET | /v1/devices/{name}/screenshot | Screen as PNG; with w a smaller JPEG (cached up to 10 s - use /observe for a fresh frame) |
| POST | /v1/devices/{name}/action | One action on the phone (no waiting) |
| POST | /v1/devices/{name}/input | Touch, key, text, scroll, clipboard, rotate (needs a live stream session) |
| GET | /v1/devices/{name}/logs | Recent logcat lines |
| GET | /v1/devices/{name}/stream | Live stream numbers - fps, bitrate, viewer lag, ABR rung (a read key is enough) |
| POST | /v1/devices/{name}/stream | WebRTC - SDP offer in, SDP answer out; a body with bitrate_kbps pins the quality rung instead (control key) |
| POST | /v1/devices/{name}/stream/probe | Latency probe for a live viewer: pulls the notification shade for 600 ms and returns the gateway clock (control key, at most once per 5 s per device) |
Network
| Method | Route | What it does |
|---|---|---|
| GET | /v1/devices/{name}/network | Network country of the device |
| POST | /v1/devices/{name}/network | Set the country the device connects from (time zone and locale follow) |
| GET | /v1/network/options | What can be chosen when creating a device right now - countries and plans |
Apps
| Method | Route | What it does |
|---|---|---|
| POST | /v1/devices/{name}/apk | Install an APK |
| GET | /v1/apps | Your apps - the APKs you uploaded (id, name, size, package, version); there is no catalog of other people's apps |
| POST | /v1/apps | Upload your APK once - multipart file=<app.apk> up to 300 MB (or JSON {name, data_b64} up to 50 MB); then install it by id on any of your phones |
| GET | /v1/apps/{id} | One of your apps |
| DELETE | /v1/apps/{id} | Delete the APK from your storage (phones keep what is installed) |
| POST | /v1/apps/{id}/install | Install your app on running phones - {devices:[…]}; each install runs as a job on its phone |
ADB
| Method | Route | What it does |
|---|---|---|
| GET | /v1/devices/{name}/adb | ADB session status |
| POST | /v1/devices/{name}/adb | Open an ADB session through the relay (code |
| DELETE | /v1/devices/{name}/adb | Close the ADB session |
Files and media
| Method | Route | What it does |
|---|---|---|
| PUT | /v1/devices/{name}/files | Put a file on the phone (push) - body is the file, path under /sdcard/ or /data/local/tmp/ |
| POST | /v1/devices/{name}/media | Media from the library on the phone as if shot with it (push), remove what we put (clean), or list it |
| GET | /v1/media | The Library - photos, videos, documents and apps with their ids and folders |
| POST | /v1/media | Upload a file - multipart file= (photo 25 MB, video 200 MB, document 50 MB, apk 300 MB) or JSON {name, data_b64, folder} up to 50 MB |
| POST | /v1/media/folders | Create a Library folder - {name} |
| POST | /v1/media/move | Move Library files into a folder - {ids, folder} (folder 0 = none) |
| POST | /v1/media/send | Copy library files into phones' galleries |
Webhooks
| Method | Route | What it does |
|---|---|---|
| GET | /v1/webhooks | Webhooks of this key and the events you can subscribe to (run.completed, run.failed, run.cancelled, run.waiting, device.problem, device.resolved) |
| POST | /v1/webhooks | Subscribe an https URL |
| GET | /v1/webhooks/{id} | One webhook |
| DELETE | /v1/webhooks/{id} | Delete it |
| POST | /v1/webhooks/{id}/rotate | New secret (shown once) |
| POST | /v1/webhooks/{id}/toggle | Pause or resume deliveries |
| POST | /v1/webhooks/{id}/test | Send a test event now |
| GET | /v1/webhooks/{id}/deliveries | Recent deliveries with status and response time |
Account
| Method | Route | What it does |
|---|---|---|
| GET | /v1/usage | Minutes of running time per device per day (UTC) for a month |
| GET | /v1/incidents | Incidents on your devices (last 100, newest first) |
| GET | /v1/health | Health of your devices (measured every 5 minutes) |
| GET | /v1/jobs | Last 50 jobs of your devices |
| GET | /v1/jobs/{id} | State of a long operation |