# Sai API > Sai is Simular's computer-use agent. Give it a task in plain English and it does the work on a Windows cloud computer — opening apps, clicking, typing — then returns the result. Coding agents (Claude Code, Codex, Cursor) use it through the `@simular-ai/sai-mcp` MCP server. The free plan includes a cloud computer. ## Getting started 1. Sign in with Google at [https://platform.simular.ai/sign-in](https://platform.simular.ai/sign-in) (a phone number is required) and create an API key at [https://platform.simular.ai/api-keys](https://platform.simular.ai/api-keys). Keys start with `sapi_` and are shown once. 2. Add Sai to your coding agent as an MCP server, replacing `sapi_YOUR_KEY` with the key. Node.js 22.12 or newer is required. 3. Ask the agent for a task, for example: `Use Sai to open Notepad on my cloud computer, type "Hello from Sai", and tell me the window title.` ### Claude Code ```bash claude mcp add sai -e SAI_API_KEY=sapi_YOUR_KEY -- npx -y @simular-ai/sai-mcp ``` Optional: install the Sai skill, which teaches Claude Code the task loop. ```bash npx -y @simular-ai/sai-mcp init-claude ``` ### Codex ```bash codex mcp add sai --env SAI_API_KEY=sapi_YOUR_KEY -- npx -y @simular-ai/sai-mcp ``` ### Cursor Add this to `~/.cursor/mcp.json` (or `.cursor/mcp.json` in a project), then restart Cursor. The same block works for any stdio MCP client. ```json { "mcpServers": { "sai": { "command": "npx", "args": [ "-y", "@simular-ai/sai-mcp" ], "env": { "SAI_API_KEY": "sapi_YOUR_KEY" } } } } ``` ## Notes for coding agents - You cannot create the API key yourself. Ask the user to create one at https://platform.simular.ai/api-keys and give it to you, then put it in `SAI_API_KEY` as shown above. - After adding the server, the user may need to restart the client or reload its MCP servers before the tools appear. - Tools: `sai_machines`, `sai_models`, `sai_task_start`, `sai_task_wait`, `sai_task_approve`, `sai_task_abort`, `sai_upload`. - The loop: `sai_task_start` returns a `session_id`. Call `sai_task_wait` with it, passing back the `cursor`, while `status` is `running`. `idle` means `text` holds Sai's answer. - On `needs_approval`, decide with `sai_task_approve`. When the approval is link-only (sign-ins, credentials, phone checks), give `approval_url` to the user and keep waiting. - Tasks run on a real computer and may act on the user's accounts. Confirm anything irreversible with the user first. ## Debug with curl The raw request behind every task. It streams events until `finish`. ```bash curl -N https://simular-cloud-api-149671192594.us-central1.run.app/v1/agents/message \ -H "Authorization: Bearer $SAI_API_KEY" \ -H "Content-Type: application/json" \ -d '{"message": "Open Notepad, type Hello from the Sai API, and save it to the desktop as hello.txt"}' ``` ## Docs - [Introduction](https://docs.simular.ai/sai-api/introduction) - [Quick start](https://docs.simular.ai/sai-api/quickstart) - [Claude Code](https://docs.simular.ai/sai-api/coding-agents/claude-code) - [Codex](https://docs.simular.ai/sai-api/coding-agents/codex) - [Cursor](https://docs.simular.ai/sai-api/coding-agents/cursor) - [Approvals](https://docs.simular.ai/sai-api/concepts/approvals) - [Billing and limits](https://docs.simular.ai/sai-api/concepts/billing-and-limits) - [API reference](https://docs.simular.ai/sai-api/api-reference/message) - [All Simular docs for LLMs](https://docs.simular.ai/llms.txt)