# Use OpenRobotics with AI agents

> Everything an AI agent needs to find, learn and call the API: a free sandbox key in one request, an MCP server, Markdown docs and an OpenAPI spec.

## Overview

| For | Use |
| --- | --- |
| An agent that calls robot models as tools | The [MCP server](#mcp-server) at `https://api.openrobotics.dev/mcp` |
| A coding agent writing code against the API | [`llms.txt`](https://www.openrobotics.dev/llms.txt), the [Markdown docs](#markdown-docs) and the [OpenAPI spec](#openapi) |
| Trying the API right now, with no account | A [sandbox key in one request](#try-it-now) |
| Building and testing without spending credits | [Test keys](#test-keys) |
| Typed clients | The [SDKs and CLI](#sdks) |

## Try it now, with no account

An agent can go from nothing to a working call in three requests, with no sign-up: [`POST /sandbox/keys`](https://www.openrobotics.dev/docs/api/create-sandbox-key) returns a free sandbox key, then it lists the live models and calls one. Sandbox calls return deterministic simulated output of the real shape with `"sandbox": true`, are never billed and never run on a GPU. The key lasts 24 hours and makes up to 20 calls a minute; for real model output, create a key on the [API keys](https://www.openrobotics.dev/keys) page.

```bash
# Get a free sandbox key (no account; 24 h, simulated output)
KEY=$(curl -s -X POST https://api.openrobotics.dev/v1/sandbox/keys | jq -r .key)

# List live models for an endpoint (no key needed)
curl -s "https://api.openrobotics.dev/v1/models?status=live&endpoint=act"

# Call one (POST /act)
curl -s https://api.openrobotics.dev/v1/act -H "Authorization: Bearer $KEY" -H "Content-Type: application/json" -d '{"model":"physical-intelligence/pi0","instruction":"pick up the red cup","observation":{"state":[0,0,0,0,0,0,0,0]},"action_horizon":8}'
```

## llms.txt

[`https://www.openrobotics.dev/llms.txt`](https://www.openrobotics.dev/llms.txt) is a short index of the docs in the [llms.txt](https://llmstxt.org) format: the base URL, how auth works, the live models grouped by endpoint, and a link to every guide and reference page. [`/llms-full.txt`](https://www.openrobotics.dev/llms-full.txt) is the whole of the docs in one Markdown file, for agents that would rather read everything at once.

## Markdown pages

Every docs page, model page, model hub and blog post has a Markdown version. Add `.md` to the URL, or send `Accept: text/markdown`. Each page also links its Markdown version with `<link rel="alternate" type="text/markdown">`, and docs pages have a **Copy as Markdown** button.

URL:

```
curl https://www.openrobotics.dev/docs/api/act.md
curl https://www.openrobotics.dev/models/physical-intelligence/pi0.md
```

Accept header:

```
curl -H "Accept: text/markdown" https://www.openrobotics.dev/docs/api/act
```

## OpenAPI spec

The API is described by an OpenAPI 3.1 spec at [`https://www.openrobotics.dev/openapi.json`](https://www.openrobotics.dev/openapi.json), also served by the API at `https://api.openrobotics.dev/v1/openapi.json`. It is generated from this reference, so the two always match. Import it into Postman or Insomnia, or give it to a code generator. `GET https://api.openrobotics.dev/v1` returns links to the spec, the docs and the models.

## MCP server

The MCP server at `https://api.openrobotics.dev/mcp` (Streamable HTTP) turns the API into tools: `list_models`, `get_model`, `get_key`, `act`, `embed`, `depth`, `segment`, `detect`, `track`, `pose`, `grasp`, `hands`, `reconstruct`, `reason`, `reward`, `predict`, `get_job`. There is one tool per endpoint, plus tools to browse models, check the key and poll world-model jobs. Image fields take base64 or an `https` URL.

There are two ways to connect:

- **Sign in (OAuth).** Clients that support MCP authorization, such as claude.ai and ChatGPT connectors, need only the URL. They open an OpenRobotics page where you approve the connection, which creates an API key named `MCP · <app>` for the active account or organization. Tick **Sandbox key** there for a free [test key](#test-keys). Disable or delete the key on the [API keys](https://www.openrobotics.dev/keys) page to disconnect the app.
- **API key header.** Clients that take headers, such as Claude Code, Cursor and VS Code, send `Authorization: Bearer …` with a key you create.

Every request needs a key: without one the server answers `401` with a `WWW-Authenticate` header, which is what starts sign-in.

## Claude Code

Add the server once; Claude Code reads the key from your environment.

```bash
claude mcp add --transport http openrobotics https://api.openrobotics.dev/mcp --header "Authorization: Bearer $OPENROBOTICS_API_KEY"
```

## Claude Desktop and claude.ai

In Claude Desktop, add the server to `claude_desktop_config.json` (Settings → Developer → Edit Config). [`mcp-remote`](https://www.npmjs.com/package/mcp-remote) connects to the remote server and adds the key header.

```json
{
  "mcpServers": {
    "openrobotics": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-remote",
        "https://api.openrobotics.dev/mcp",
        "--header",
        "Authorization:${AUTH_HEADER}"
      ],
      "env": {
        "AUTH_HEADER": "Bearer sk-orb-v1-…"
      }
    }
  }
}
```

On claude.ai, add a custom connector (Settings → Connectors → Add custom connector) with the URL `https://api.openrobotics.dev/mcp`, then click **Connect** and approve it on OpenRobotics. Connectors added on claude.ai also work in Claude Desktop, without editing the config file.

## ChatGPT

In ChatGPT, add a connector (Settings → Connectors → Create, with developer mode on) with the URL `https://api.openrobotics.dev/mcp` and authentication **OAuth**, then approve the connection on OpenRobotics.

## Cursor

Add the server to `~/.cursor/mcp.json`, or `.cursor/mcp.json` in a project. Cursor fills in `${env:…}` from your environment.

```json
{
  "mcpServers": {
    "openrobotics": {
      "url": "https://api.openrobotics.dev/mcp",
      "headers": {
        "Authorization": "Bearer ${env:OPENROBOTICS_API_KEY}"
      }
    }
  }
}
```

## VS Code

Add the server to `.vscode/mcp.json`. VS Code asks for the key the first time and stores it securely.

```json
{
  "servers": {
    "openrobotics": {
      "type": "http",
      "url": "https://api.openrobotics.dev/mcp",
      "headers": {
        "Authorization": "Bearer ${input:openrobotics-key}"
      }
    }
  },
  "inputs": [
    {
      "type": "promptString",
      "id": "openrobotics-key",
      "description": "OpenRobotics API key",
      "password": true
    }
  ]
}
```

## Test keys

Give agents a test key while they build. Tick **Test key** when you create a key on the [API keys](https://www.openrobotics.dev/keys) page: it starts with `sk-orb-test-`, every call is free and returns simulated output of the real shape with `"sandbox": true`, and nothing runs on a GPU. An agent without one can get its own with [`POST /sandbox/keys`](https://www.openrobotics.dev/docs/api/create-sandbox-key) (no account; it expires in 24 hours), and the MCP server's errors point there too. See [Test keys](https://www.openrobotics.dev/docs/authentication#test-keys).

## SDKs and CLI

The SDKs read `OPENROBOTICS_API_KEY` from the environment. The CLI logs in through your browser, so you never paste a key into a terminal.

Python:

```python
# pip install openrobotics-sdk
from openrobotics import OpenRobotics

client = OpenRobotics()
res = client.act(
    model="physical-intelligence/pi0",
    instruction="put the black bowl on the plate",
    observation={"image": image_b64, "state": state},
)
print(res.actions)
```

TypeScript:

```typescript
// npm i openrobotics
import OpenRobotics from "openrobotics";

const client = new OpenRobotics();
const res = await client.act({
  model: "physical-intelligence/pi0",
  instruction: "put the black bowl on the plate",
  observation: { image: imageB64, state },
});
```

CLI:

```bash
openrobotics login             # opens https://www.openrobotics.dev/cli in your browser
openrobotics login --sandbox   # or: a free 24 h sandbox key, no browser or account
openrobotics models            # the live models
```

## A prompt for coding agents

Paste this into Claude Code, Cursor or any coding agent to get it started on the right foot.

```
Use the OpenRobotics API (https://api.openrobotics.dev/v1) to call robot foundation models.
- Read https://www.openrobotics.dev/llms.txt first; every docs page has a Markdown version at its URL + ".md".
- The OpenAPI spec is at https://www.openrobotics.dev/openapi.json.
- Auth: "Authorization: Bearer $OPENROBOTICS_API_KEY". Never hard-code or print the key.
- Find a live model with GET /models?status=live&endpoint=<endpoint>, and check its "inputs"
  with GET /models/{provider}/{name} before building a request.
- Handle 503 model_warming by waiting Retry-After seconds and retrying; branch on error.type.
- Use the Python SDK (pip install openrobotics-sdk) or TypeScript SDK (npm i openrobotics) when the project allows.
- Test with a test key (sk-orb-test-…): free, simulated output with "sandbox": true.
  No key yet? POST https://api.openrobotics.dev/v1/sandbox/keys returns one (no account; it lasts 24 h).
```
