Docs/Sai API
Get started

Sai API

What the Sai API is and how a request flows through it.

View as Markdown

The Sai API lets your code or your coding agent hand a task to Sai, a computer-use agent that works on a real Windows or macOS computer. You send a message, Sai works on the computer, and you read the result.

Which Simular API is this

This site documents three things that are easy to confuse:

You want toUse
Hand a task in plain language to Sai, running on a cloud or linked computerSai API (this tab)
Script a Mac yourself with the simulang CLI, or from Claude Code on your own machineSimulang with Claude Code
Trigger a saved Simular Pro action with curlSimular Pro: use curl (legacy)

Base URL

https://api.simular.ai/v1/agents

The portal, where you sign in and create API keys, is platform.simular.ai.

How a request flows

  1. You POST /message with a task. With wait: false the API answers at once with a sessionId.
  2. Sai works on the computer. You GET /events to read progress, text and approval requests.
  3. When Sai needs permission, an event of type data-approval-request arrives. You answer it with POST /approve, or you open its approvalUrl in a browser when a human has to act.
  4. When status is idle, text holds the result.

Every call carries Authorization: Bearer sapi_.... See Authentication.

Two ways to use it

  • HTTP. Any language. Start with the Quickstart and the examples.
  • A coding agent. Claude Code, Codex and Cursor call Sai through the @simular-ai/sai-mcp server. One command installs it. See Claude Code.

What you get

  • A computer. Paid accounts see their own registered machines. Free accounts get one pooled Windows cloud computer. See Computers.
  • One conversation per computer on the API channel. Follow-up messages continue it. See Sessions.
  • No model keys to bring. The model and the computer are included in your Sai plan. See Billing and limits.

Streaming or polling

POST /message with wait: true (the default) streams events over Server-Sent Events. Use it from a browser or a long-lived process. Coding agents and short scripts should send wait: false and poll /events. Both paths carry the same event vocabulary.