# Computer use API: drive a cloud Linux desktop from your own code

*Kubi, cloud desktops for AI agents. https://trykubi.com/integrations/your-own-code, last changed 2026-11-23. The page as Markdown; the same facts as the page itself.*

**What it is.** When the agent is yours, the screen is an API: ask for a screenshot, send actions against the id it came with, run a command, move a file. The SDK is TypeScript; everything else talks to the same HTTP endpoints with a key in the header. One screen or a hundred, the same two calls.

your own code is TypeScript, or any language over HTTP, from the SDK and the API. A screen is $20 a month at the founding price, or $0.035 an hour billed by the minute.

## What your own code gains

- **A screenshot you can act against.** Every screenshot carries an id. Send it back with your actions and the call is refused if anything moved on the screen in between, so a stale plan cannot click the wrong thing.
- **Twenty actions in one call.** A form is one call, not eight round trips. The reply is the screen after it settles, with the next id, which keeps a loop short and cheap.
- **Priced by the machine, not the call.** A persistent screen is $20 a month at the founding price however many calls you make, and a disposable one is $0.035 an hour billed by the minute. No per-action pricing to model.

## Set it up

1. **Make a key.** In the dashboard, open API keys and create one with read and control. It is shown once.

```
export KUBI_API_KEY=kubi_...
```

2. **Install the SDK.** 

```
npm install @trykubi/sdk
```

3. **Look, then act.** 

```
import { Kubi } from "@trykubi/sdk";

const client = new Kubi(); // reads KUBI_API_KEY
const screen = client.screen();

const shot = await screen.screenshot();
const result = await screen.click({
  x: 640,
  y: 360,
  screenshot_id: shot.screenshot_id,
  screenshot: "after",
});
```

4. **Any other language.** Call the API with the same key. Every endpoint is in the reference.

```
curl https://api.trykubi.com/v1/screens/scr_.../screenshot \
  -H "Authorization: Bearer $KUBI_API_KEY"
```


The server's address is https://mcp.trykubi.com. Each app's setup is kept current at https://docs.trykubi.com/mcp/connect.

## The first thing to try

"A loop of five steps: screenshot, read the tree, click the element you want by id, type into it, screenshot again. Then open the live view and watch it run."

## What to know

- Write calls take an idempotency key, so a retry after a timeout cannot click twice.
- Keys carry their own permissions and their own set of screens. Give a script the least of both.
- The API creates, starts, stops and deletes screens; the MCP server deliberately cannot.

## Questions people ask

### Is there a Python SDK?

Not yet. Python, Go and everything else use the HTTP API, which is the same surface the SDK calls; the reference has every endpoint with examples.

### Can I run my agent on the screen itself?

Yes, and that is the shape for a job that should outlive your laptop: install it on the screen, keep its model key as a secret for that screen, and run it as a service so it comes back after a restart.

### How many screens can one key drive?

As many as you give it, up to your organization's cap. A hundred disposable screens for an eval run is the case the by-the-minute price is for.

## Read next

- [Quickstart](https://docs.trykubi.com/quickstart)
- [TypeScript SDK](https://docs.trykubi.com/sdk/typescript)
- [API reference](https://docs.trykubi.com/api)
- [Pricing](https://trykubi.com/pricing)
- [Kubi compared](https://trykubi.com/compare)
- [Claude Code on a screen](https://trykubi.com/integrations/claude-code)
- [Codex on a screen](https://trykubi.com/integrations/codex)
- [Cursor on a screen](https://trykubi.com/integrations/cursor)
