Introduction
Corix provides cloud-based desktop infrastructure for AI agents. Spin up a virtual machine, connect any AI model, and let it autonomously control the computer through screenshots, mouse clicks, keyboard input, and shell commands.
Corix is a plain HTTP API. Any language with an HTTP client works. We also provide Python and TypeScript SDKs.
Base URL: https://corix.dev/api
Quickstart
Get a computer running in three lines of code:
Python
import corix
computer = corix.create(os="linux", cpu=2, ram="8gb")
result = computer.prompt(
model="claude-sonnet-4-6",
task="Open the browser and search for 'Corix AI'"
)
print(result.output)cURL
# Create a computer
curl -X POST https://corix.dev/api/v1/computers \
-H "Authorization: Bearer crx_your_api_key" \
-H "Content-Type: application/json" \
-d '{"name": "my-agent", "cpu": 2, "ram": 4}'
# Take a screenshot
curl https://corix.dev/api/v1/computers/{id}/screenshot \
-H "Authorization: Bearer crx_your_api_key" \
--output screenshot.pngAuthentication
All API requests require a Bearer token. Get your API key from the dashboard.
Header
Authorization: Bearer crx_your_api_key
Computer object
A computer is a virtual machine with a full Linux desktop (XFCE), Firefox, Python, Node.js, and git.
Computer object
{
"id": "ee5e84e7-dbaa-4730-884a-33866530d34f",
"workspace_id": "b3aa1e63-e9b2-4fd5-9345-3b07ba7668dd",
"user_id": "2812ea8d-ab93-436e-aa9d-7cb13ec7d42a",
"name": "my-agent",
"os": "linux",
"cpu": 2, // 1, 2, 4, 8, 16
"ram": 8, // 4, 8, 16, 32, 64 (GB)
"disk_size_gb": 8,
"resolution": "1280x720x24",
"status": "running", // creating | starting | running | stopping | stopped | restarting | terminated | error
"container_id": "090fdc1ddd50",
"hostname": "127.0.0.1:10000",
"auto_stop_minutes": null, // null = disabled, number = minutes of inactivity
"created_at": "2026-05-17T12:00:00Z",
"updated_at": "2026-05-17T12:00:00Z",
"terminated_at": null
}Workspace object
Workspaces group computers together. Each user starts with a default workspace.
Workspace object
{
"id": "b3aa1e63-e9b2-4fd5-9345-3b07ba7668dd",
"user_id": "2812ea8d-ab93-436e-aa9d-7cb13ec7d42a",
"name": "Production",
"status": "active", // active | inactive
"icon_url": null, // uploaded workspace icon
"created_at": "2026-05-17T12:00:00Z",
"updated_at": "2026-05-17T12:00:00Z"
}The agent loop
AI agents operate on computers in a cycle: See (screenshot), Decide (model inference), Act (click/type/execute), Repeat. The SDK handles this loop automatically with computer.prompt().
Create workspace
POST/v1/workspaces
Request
{ "name": "Production" }Response (201)
{
"id": "b3aa1e63-e9b2-4fd5-9345-3b07ba7668dd",
"user_id": "2812ea8d-ab93-436e-aa9d-7cb13ec7d42a",
"name": "Production",
"status": "active",
"created_at": "2026-05-17T12:00:00Z"
}Get workspace
GET/v1/workspaces/:id
Returns full details for a single workspace.
List workspaces
GET/v1/workspaces
Response
{
"workspaces": [
{ "id": "...", "name": "Default", "status": "active", "created_at": "..." },
{ "id": "...", "name": "Production", "status": "active", "created_at": "..." }
]
}Delete workspace
DELETE/v1/workspaces/:id
Permanently deletes the workspace and terminates all its computers.
Create computer
POST/v1/computers
Request
{
"name": "my-agent",
"cpu": 2, // 1, 2, 4, 8, or 16
"ram": 8, // 4, 8, 16, 32, or 64 (GB)
"disk_size_gb": 8,
"workspace_id": "optional, uses default if omitted"
}Response (201)
{
"id": "ee5e84e7-dbaa-4730-884a-33866530d34f",
"workspace_id": "b3aa1e63-e9b2-4fd5-9345-3b07ba7668dd",
"name": "my-agent",
"os": "linux",
"cpu": 2,
"ram": 8,
"status": "running",
"container_id": "090fdc1ddd50",
"created_at": "2026-05-17T12:00:00Z"
}Get computer
GET/v1/computers/:id
Returns full details for a single computer.
List computers
GET/v1/computers
Returns all non-terminated computers for the authenticated user.
Response
{
"computers": [ ... ],
"total": 2
}Delete computer
DELETE/v1/computers/:id
Stops the container and permanently removes the computer.
Clone computer
POST/v1/computers/:id/clone
Creates a new computer with the same specs. Does not copy filesystem state.
Request
{ "name": "my-agent-copy" } // optional, defaults to "{name} (copy)"Resize computer
POST/v1/computers/:id/resize
Live-resize CPU and/or RAM without restarting the computer.
Request
{ "cpu": 2, "ram": 8 } // provide one or bothMove computer
POST/v1/computers/:id/move
Move a computer to a different workspace.
Request
{ "workspace_id": "target-workspace-uuid" }Start computer
POST/v1/computers/:id/start
Starts a stopped computer. Filesystem is preserved from the previous session.
Stop computer
POST/v1/computers/:id/stop
Stops the computer without deleting it. Running processes are terminated but the filesystem is preserved.
Restart computer
POST/v1/computers/:id/restart
Reboots the computer. Filesystem is preserved, all running processes are terminated, and a fresh desktop session starts.
Auto-stop
GET/v1/computers/:id/auto-stop
Get the current auto-stop configuration.
Response
{ "auto_stop_minutes": 30 } // null = disabledPATCH/v1/computers/:id/auto-stop
Set or disable auto-stop. The computer will automatically stop after the specified minutes of inactivity. Set to 0 to disable.
Request
{ "minutes": 30 } // 0 to disableScreenshot
GET/v1/computers/:id/screenshot
Returns the current desktop. Default response is a raw PNG image. Add ?format=base64 for a JSON response with embedded image data.
Raw PNG (default)
GET /v1/computers/:id/screenshot
// Response: binary PNG image (1280x720)
Base64 JSON (?format=base64)
{
"success": true,
"image": "data:image/png;base64,iVBORw0KGgo...",
"metadata": {
"width": 1280,
"height": 720,
"format": "png",
"size": 25203,
"timestamp": "2026-05-17T12:00:00Z"
}
}Click
POST/v1/computers/:id/click
Request
{ "x": 500, "y": 300, "button": "left" }
// button: "left" (default), "right", "middle"
// double_click: true for double-clickDrag
POST/v1/computers/:id/drag
Request
{ "start_x": 100, "start_y": 200, "end_x": 400, "end_y": 300, "button": "left" }Type text
POST/v1/computers/:id/type
Request
{ "text": "Hello from Corix" }Key press
POST/v1/computers/:id/key
Request
{ "key": "Return" }
// Keys: Return, BackSpace, Tab, Up, Down, Left, Right, Delete, Home, End, space, ctrl+c, alt+F4POST/v1/computers/:id/scroll
Request
{ "x": 500, "y": 300, "direction": "down", "amount": 3 }
// direction: "up" or "down"Wait
POST/v1/computers/:id/wait
Pause for a specified duration (max 30 seconds). Useful in agent loops between actions.
Execute bash
POST/v1/computers/:id/bash
Request
{ "command": "ls -la /home" }Response
{
"stdout": "total 4\ndrwxr-xr-x 2 root root 4096 May 17 12:00 .\n",
"stderr": "",
"exit_code": 0
}Execute Python
POST/v1/computers/:id/python
Request
{ "code": "import sys\nprint(sys.version)" }Response
{
"stdout": "3.11.2 (main, Mar 13 2023, 12:18:29) [GCC 12.2.0]\n",
"stderr": "",
"exit_code": 0
}List files
GET/v1/computers/:id/files?path=/root
List files and directories at the given path inside the computer.
Response
{
"path": "/root",
"entries": [
{ "name": "Documents", "type": "directory", "size": 0 },
{ "name": "hello.py", "type": "file", "size": 142 }
]
}Upload file
POST/v1/computers/:id/files/upload?path=/root/data.csv
Upload a file to the specified path inside the computer. Send the raw file content as the request body.
cURL example
curl -X POST "https://corix.dev/api/v1/computers/{id}/files/upload?path=/root/data.csv" \
-H "Authorization: Bearer crx_your_api_key" \
--data-binary @local_file.csvDownload file
GET/v1/computers/:id/files/download?path=/root/output.txt
Download a file from the computer. Returns raw binary content with Content-Disposition header. Max 50MB.
Delete file
DELETE/v1/computers/:id/files?path=/root/temp.txt
Delete a file inside the computer.
WebSocket terminal
Connect to a real-time interactive shell session via WebSocket. The connection stays open for bidirectional I/O.
Endpoint
wss://compute.corix.dev/ws/terminal/:computerId?token=crx_your_api_key
Send JSON messages to write to stdin:
Client to server
{ "type": "stdin", "data": "ls -la\n" }Receive JSON messages with stdout, stderr, and exit events:
Server to client
{ "type": "stdout", "data": "total 4\ndrwxr-xr-x 2 root root 4096 ..." }
{ "type": "stderr", "data": "command not found" }
{ "type": "exit", "code": 0 }JavaScript example
const ws = new WebSocket(
"wss://compute.corix.dev/ws/terminal/" + computerId + "?token=" + apiKey
);
ws.onmessage = (event) => {
const msg = JSON.parse(event.data);
if (msg.type === "stdout") process.stdout.write(msg.data);
if (msg.type === "stderr") process.stderr.write(msg.data);
};
// Send a command
ws.send(JSON.stringify({ type: "stdin", data: "echo hello\n" }));Error codes
All errors return JSON with an error field.
| Status | Meaning |
|---|
| 200 | Success |
| 201 | Created |
| 400 | Bad request (missing or invalid parameters) |
| 401 | Unauthorized (missing or invalid API key) |
| 403 | Forbidden (plan limit reached, wrong owner) |
| 404 | Not found (computer or workspace does not exist) |
| 409 | Conflict (duplicate workspace name) |
| 429 | Rate limited |
| 500 | Internal server error |
| 502 | Agent unreachable (computer may be starting) |
Error response shape
{ "error": "Computer not found" }Rate limits
API requests are rate-limited per API key. Current limits by plan:
| Plan | API calls/day | Max computers | Max CPU | Max RAM |
|---|
| Starter | 1,000 | 2 | 1 vCPU | 4 GB |
| Pro | Unlimited | 20 | 4 vCPU | 16 GB |
| Scale | Unlimited | 100 | 8 vCPU | 32 GB |
When rate limited, the API returns 429. Use exponential backoff (start at 1s, double each retry, max 60s).
Python SDK
Install
pip install corix-sdk
Usage
import corix
client = corix.Client(api_key="crx_your_api_key")
computer = client.computers.create(name="my-agent", cpu=2, ram=8)
# Autonomous agent mode
result = computer.prompt(
model="claude-sonnet-4-6",
task="Download the CSV from example.com and summarize it"
)
# Manual control
screenshot = computer.screenshot()
computer.click(500, 300)
computer.type("Hello")
output = computer.bash("cat /tmp/data.csv")
py_output = computer.python("import os; print(os.listdir('/'))")
# Lifecycle
computer.stop()
computer.start()
computer.restart()
computer.terminate()TypeScript SDK
Install
npm install @corix/sdk
Usage
import { Corix } from "@corix/sdk";
const client = new Corix({ apiKey: "crx_your_api_key" });
const computer = await client.computers.create({
name: "my-agent", cpu: 2, ram: 8,
});
const result = await computer.prompt({
model: "claude-sonnet-4-6",
task: "Open Firefox and screenshot the homepage",
});
await computer.click(500, 300);
await computer.type("Hello from Corix");
const output = await computer.bash("ls -la");
const pyOutput = await computer.python("print('hello')");
await computer.stop();
await computer.start();
await computer.terminate();