Kubi Docs
Kubi API

Every call on a screen with the screenshot it returned, kept 30 days.


Read the screen's history

GET
https://api.trykubi.com/v1
/screens/{screen_id}/history
Bearer (API key)

Needs the read permission. Answers within 28 s.

Every call made on the screen, newest first: what was called, its parameters and typed text, which key or app called it, its run label, the result, how long it took and the screenshot it returned. Changes to the screen are rows too. Kept 30 days. With detailed history off, rows keep only what was called, by whom, when and the result. The live view is never recorded, and typed text that matches an organization secret is replaced. Rows are written after the reply, never on the call's path. To follow live, pass since (a row id) with wait_s and get newer rows oldest first.

Read the screen's history › path Parameters

screen_id
​string · maxLength: 24 · pattern: ^scr_[0-9a-z]{20}$ · required

Screen id (scr_...).

Read the screen's history › query Parameters

limit
​integer · int32 · min: 1 · max: 100

Page size, 1 to 100.

Default: 20
after
​string · maxLength: 200 · pattern: ^[A-Za-z0-9_-]+$

Opaque cursor from the previous page's next.

wait_s
​integer · int32 · min: 0 · max: 25

Long poll: hold the reply up to this many seconds until something changes. 0 answers at once. Capped at 25 so every call ends within 30 s.

Default: 0
since
​string · maxLength: 30 · pattern: ^evt_[0-9a-z]{20}$

Follow mode: return rows newer than this id, oldest first.

run
​string · maxLength: 100

Only rows with this Kubi-Run label.

actor
​string · enum · maxLength: 10

Only rows by this kind of actor.

Enum values:
api_key
app
person
system
errors_only
​boolean

Only rows whose result is an error.

Default: false

Read the screen's history › Headers

Kubi-Run
​string · maxLength: 100 · pattern: ^[ -~]{1,100}$

Optional label that groups calls into one run in the screen's history. It is only a label and never locks the screen. The SDK fills it from KUBI_RUN, else Claude Code's CLAUDE_CODE_SESSION_ID, else one id per client it creates.

Read the screen's history › Responses

Success.

​HistoryEntry[] · maxItems: 100 · required
​required

Get a saved screenshot

GET
https://api.trykubi.com/v1
/screens/{screen_id}/screenshots/{screenshot_id}
Bearer (API key)

Needs the read permission. Answers within 5 s.

The exact image a call returned, from the screen's history, as image bytes. Kept 30 days, then 404 NOT_FOUND. Nothing is saved while detailed history is off.

Get a saved screenshot › path Parameters

screen_id
​string · maxLength: 24 · pattern: ^scr_[0-9a-z]{20}$ · required

Screen id (scr_...).

screenshot_id
​string · maxLength: 25 · pattern: ^shot_[0-9a-z]{20}$ · required

Saved screenshot id (shot_...), from a reply or a history row.

Get a saved screenshot › Headers

Kubi-Run
​string · maxLength: 100 · pattern: ^[ -~]{1,100}$

Optional label that groups calls into one run in the screen's history. It is only a label and never locks the screen. The SDK fills it from KUBI_RUN, else Claude Code's CLAUDE_CODE_SESSION_ID, else one id per client it creates.

Get a saved screenshot › Responses

Success.

string · binary · maxLength: 40000000