Clousd Screen and input API

The Screen and input API from Clousd — 6 operation(s) for screen and input.

GitHub OpenAPI

Operations 7

GET /devices/{name}/screenshot Screen as PNG; with w a smaller JPEG (cached up to 10 s - use /observe for a… #
POST /devices/{name}/action One action on the phone (no waiting) #
POST /devices/{name}/input Touch, key, text, scroll, clipboard, rotate (needs a live stream session) #
GET /devices/{name}/logs Recent logcat lines #
GET /devices/{name}/stream Live stream numbers - fps, bitrate, viewer lag, ABR rung (a read key is enough) #
POST /devices/{name}/stream WebRTC - SDP offer in, SDP answer out; a body with bitrate_kbps pins the… #
POST /devices/{name}/stream/probe Latency probe for a live viewer: pulls the notification shade for 600 ms and… #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/clousd-com:clousd-com-screen-and-input-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

clousd-com-screen-and-input-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Clousd Com Screen and input API
  version: '1.0'
  description: 'Operations tagged Screen and input across 2 of this provider''s published API definitions: clousd-com-openapi-v1.yaml, clousd-com-openapi.yml. Each path carries the servers of the definition it was published in.'
servers:
- url: https://api.clousd.com/v1
security:
- bearer: []
tags:
- name: Screen and input
paths:
  /devices/{name}/screenshot:
    parameters:
    - $ref: '#/components/parameters/name'
    get:
      summary: Screen as PNG; with w a smaller JPEG (cached up to 10 s - use /observe for a…
      parameters:
      - name: w
        in: query
        schema:
          type: integer
          minimum: 40
          maximum: 540
      responses:
        '200':
          description: Image
          content:
            image/png: {}
            image/jpeg: {}
      tags:
      - Screen and input
      operationId: getDevicesByNameScreenshot
      x-operation-id-source: derived
    servers:
    - url: https://api.clousd.com/v1
  /devices/{name}/action:
    parameters:
    - $ref: '#/components/parameters/name'
    post:
      summary: One action on the phone (no waiting)
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Action'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  ok:
                    type: boolean
                  output:
                    type: string
                  texts:
                    type: array
                    items:
                      type: string
                  packages:
                    type: array
                    items:
                      type: string
        '400':
          $ref: '#/components/responses/Error'
      tags:
      - Screen and input
      operationId: postDevicesByNameAction
      x-operation-id-source: derived
    servers:
    - url: https://api.clousd.com/v1
  /devices/{name}/input:
    parameters:
    - name: name
      in: path
      required: true
      schema:
        type: string
    post:
      summary: Touch, key, text, scroll, clipboard, rotate (needs a live stream session)
      description: 'Same messages as the stream''s input data channel. text types ASCII with key events and pastes anything else (Cyrillic, CJK, long text) through the clipboard; scroll is a mouse wheel at x,y with dx/dy as fractions of one notch in [-1, 1]; paste puts s into the phone clipboard and pastes it; clip only sets the clipboard; clipboard asks for the phone clipboard - the text comes back to the viewer over the data channel as {t: clipboard, s}.'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                t:
                  type: string
                  enum:
                  - touch
                  - key
                  - text
                  - scroll
                  - paste
                  - clip
                  - clipboard
                  - rotate
                a:
                  type: integer
                  description: 'touch/key: 0 down, 1 up, 2 move'
                x:
                  type: number
                y:
                  type: number
                p:
                  type: integer
                  description: pointer id (-1 = mouse)
                code:
                  type: integer
                  description: Android key code
                s:
                  type: string
                  description: text (text
                  paste: null
                  clip): null
                dx:
                  type: number
                  description: 'scroll: horizontal notches, -1..1'
                dy:
                  type: number
                  description: 'scroll: vertical notches, -1..1 (positive = up)'
      responses:
        '200':
          description: Applied
        '409':
          $ref: '#/components/responses/Error'
      tags:
      - Screen and input
      operationId: postDevicesByNameInput
      x-operation-id-source: derived
    servers:
    - url: https://api.clousd.com/v1
  /devices/{name}/logs:
    parameters:
    - $ref: '#/components/parameters/name'
    get:
      summary: Recent logcat lines
      parameters:
      - name: lines
        in: query
        schema:
          type: integer
          maximum: 2000
      responses:
        '200':
          description: OK
      tags:
      - Screen and input
      operationId: getDevicesByNameLogs
      x-operation-id-source: derived
    servers:
    - url: https://api.clousd.com/v1
  /devices/{name}/stream:
    parameters:
    - name: name
      in: path
      required: true
      schema:
        type: string
    get:
      summary: Live stream numbers - fps, bitrate, viewer lag, ABR rung (a read key is enough)
      responses:
        '200':
          description: Stream stats
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StreamStats'
      tags:
      - Screen and input
      operationId: getDevicesByNameStream
      x-operation-id-source: derived
    post:
      summary: WebRTC - SDP offer in, SDP answer out; a body with bitrate_kbps pins the…
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                bitrate_kbps:
                  type: integer
                  description: 'Pin the encoder bitrate: 200-20000, or 0 to hand the ladder back to automatic. Any other body is taken as an SDP offer.'
                  example: 2500
      responses:
        '200':
          description: 'SDP answer for an offer; {"ok": true} for bitrate_kbps'
        '400':
          $ref: '#/components/responses/Error'
        '403':
          $ref: '#/components/responses/Error'
        '409':
          description: 'bitrate_kbps while no stream is running: there is nothing to change yet'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      tags:
      - Screen and input
      operationId: postDevicesByNameStream
      x-operation-id-source: derived
    servers:
    - url: https://api.clousd.com/v1
  /devices/{name}/stream/probe:
    parameters:
    - name: name
      in: path
      required: true
      schema:
        type: string
    post:
      summary: 'Latency probe for a live viewer: pulls the notification shade for 600 ms and…'
      description: The viewer looks for the first frame whose top changes after t0_ms, computes glass-to-glass milliseconds and reports it back with POST …/stream {viewer, g2g_ms}. Needs a live stream session.
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                viewer:
                  type: string
                  maxLength: 40
                  description: Viewer id, as reported in stream stats
      responses:
        '200':
          description: Gateway clock around the flash
          content:
            application/json:
              schema:
                type: object
                properties:
                  ok:
                    type: boolean
                  recv_ms:
                    type: integer
                    description: Request received (gateway clock, ms)
                  t0_ms:
                    type: integer
                    description: Shade started moving
                  now_ms:
                    type: integer
                    description: Response sent
                  exec_ms:
                    type: integer
                    description: How long the shade command took
        '403':
          $ref: '#/components/responses/Error'
        '409':
          description: No live stream session to measure
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: A probe ran less than 5 s ago on this device
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      tags:
      - Screen and input
      operationId: postDevicesByNameStreamProbe
      x-operation-id-source: derived
    servers:
    - url: https://api.clousd.com/v1
components:
  schemas:
    StreamStats:
      type: object
      description: 'Live picture quality of one device: what came in from the phone, what went out to each viewer

        and what the browsers last said about themselves.

        '
      properties:
        phone:
          type: string
        running:
          type: boolean
          description: The phone screen is being captured right now
        viewers:
          type: integer
          description: Browsers watching right now
        encoder:
          type: string
          description: Phone encoder doing the capture; empty means scrcpy picked one
          example: c2.android.avc.encoder
        fps_in:
          type: number
          description: Frames from the phone over the last second (0 when no frame arrived for 2 s)
        kbps_in:
          type: number
          description: Kbit/s from the phone over the last second
        last_frame_age_ms:
          type: integer
          description: Age of the last frame, ms; -1 means there were no frames at all
        pli_per_min:
          type: number
          description: 'Key frame requests from viewers per minute: it grows when the picture falls apart'
        dropped:
          type: integer
          description: Frames the gateway dropped since start (a viewer could not keep up)
        up_s:
          type: integer
          description: Seconds the capture has been running
        g2g_ms_last:
          type: number
          description: Last glass-to-glass measurement (phone screen to browser), ms
        g2g_age_s:
          type: integer
          description: Seconds since that measurement; -1 means it was never measured
        bitrate_kbps:
          type: integer
          description: Bitrate the encoder runs at right now
        abr:
          type: object
          description: 'Quality ladder: 4000 -> 2500 -> 1500 -> 800 kbit/s (the top rung is the gateway -bitrate, 4 Mbit/s by default)'
          properties:
            mode:
              type: string
              enum:
              - auto
              - manual
              - false
            rung:
              type: integer
              description: Current rung, 0 is the top one
            rungs:
              type: integer
            ladder_kbps:
              type: array
              items:
                type: integer
              example:
              - 4000
              - 2500
              - 1500
              - 800
            reason:
              type: string
              description: Why the ladder sits on this rung
            changed_at:
              type: string
              description: When the rung last changed (RFC3339; empty if it never did)
        peers:
          type: array
          description: What went out to each viewer (gateway counters)
          items:
            type: object
            properties:
              id:
                type: integer
              frames:
                type: integer
              keys:
                type: integer
                description: Key frames sent
              pli:
                type: integer
              dropped:
                type: integer
              kbps:
                type: number
              age_s:
                type: integer
                description: Seconds this viewer has been connected
              rtt_ms:
                type: integer
                description: From RTCP; -1 means the viewer has never answered over RTCP yet
              loss_pct:
                type: number
        clients:
          type: array
          description: What the browser last said about itself (one sample per viewer, sent every 10 s)
          items:
            type: object
            properties:
              viewer:
                type: string
              rtt_ms:
                type: number
              fps:
                type: number
              kbps:
                type: number
              jitter_ms:
                type: number
              dropped:
                type: integer
              g2g_ms:
                type: number
              g2g_age_s:
                type: integer
                description: -1 means this viewer never measured glass-to-glass
              age_s:
                type: integer
                description: Seconds since the sample
    Action:
      type: object
      required:
      - op
      properties:
        op:
          type: string
          enum:
          - 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
          description: 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`.
        x:
          type: integer
          description: phone pixels
        y:
          type: integer
        x2:
          type: integer
        y2:
          type: integer
        ms:
          type: integer
          description: swipe duration; for wait_text the timeout in ms (max 120000)
        text:
          type: string
          description: text to type (any language), text to find, scroll direction (down|up)
        key:
          type: string
          description: home, back, recents, enter, power, tab, del, menu, volume_up, volume_down, wake, sleep or a keycode
        package:
          type: string
        url:
          type: string
        fx:
          type: number
          description: x as a fraction of the screen width (0..1) instead of pixels (tap, swipe, long_press)
        fy:
          type: number
        intent:
          type: object
          description: for op=intent - started like `am start` from the shell user
          properties:
            action:
              type: string
              example: android.intent.action.VIEW
            data:
              type: string
              description: a URI, e.g. https://example.com or geo:0,0?q=coffee
            package:
              type: string
            component:
              type: string
              example: com.android.settings/.Settings
            type:
              type: string
              description: MIME type
            extras:
              type: object
              additionalProperties:
                type: string
              description: string extras
    Error:
      type: object
      properties:
        ok:
          type: boolean
          const: false
        error:
          type: string
        message:
          type: string
  responses:
    Error:
      description: Error
      content:
        application/json:
          schema:
            type: object
            properties:
              error:
                type: string
              message:
                type: string
  parameters:
    name:
      name: name
      in: path
      required: true
      schema:
        type: string
  securitySchemes:
    bearer:
      type: http
      scheme: bearer
x-refined-from:
- clousd-com-openapi-v1.yaml
- clousd-com-openapi.yml