> ## Documentation Index
> Fetch the complete documentation index at: https://docs.yambr.com/llms.txt
> Use this file to discover all available pages before exploring further.

# LiteLLM gateway

> api.yambr.com is a public MCP endpoint (Computer Use tools only). Bring your own model — we don't resell inference.

[api.yambr.com](https://api.yambr.com) is a [LiteLLM](https://github.com/BerriAI/litellm) deployment that **only exposes the Computer Use MCP endpoint** publicly. It is *not* a model gateway — we don't proxy `chat/completions` and we don't resell OpenAI / Anthropic / Google inference.

<Warning>
  **Bring your own model.** Your Yambr API key is for the MCP tool server at `https://api.yambr.com/mcp/computer_use`. LLM requests go to *your* provider (OpenAI, Anthropic, a self-hosted LiteLLM, ...) with *your* key. Pipelines that do `OpenAI(base_url="https://api.yambr.com").chat.completions.create(...)` will fail — that endpoint is closed.
</Warning>

## The public endpoint

```
POST https://api.yambr.com/mcp/computer_use
Authorization: Bearer <yambr-key>
```

JSON-RPC over Streamable HTTP. Same protocol as any MCP server — see [MCP API reference](/api-reference/introduction).

What you get:

* Computer Use tools: `bash_tool`, `view`, `create_file`, `str_replace`, `sub_agent`
* Per-chat sandbox containers (isolated Docker) — scoped by `x-chat-id` header
* Live browser, terminal, and file preview URLs served from `cu.yambr.com`

## Three ways to wire it in

### A. MCP-native client (Claude Desktop, MCP Inspector, Agents SDK)

Point your client directly at the endpoint. Your client's host application drives the LLM; our server provides the tools.

```json theme={null}
{
  "mcpServers": {
    "yambr-computer-use": {
      "url": "https://api.yambr.com/mcp/computer_use",
      "transport": "streamable-http",
      "headers": {
        "Authorization": "Bearer sk-yambr-..."
      }
    }
  }
}
```

See [Claude Desktop integration](/integrations/claude-desktop).

### B. OpenAI / Anthropic SDK — tool-use with your own model

Call your own provider. Hand the model a tool spec that forwards tool calls to our MCP endpoint. Many frameworks (OpenAI Agents SDK, Mastra, Vercel AI SDK, LangChain, Anthropic MCP support) have native MCP-tool adapters — point them at `https://api.yambr.com/mcp/computer_use` with your Yambr key.

Minimal shape with the OpenAI Agents SDK:

```python theme={null}
from agents import Agent, Runner
from agents.mcp import MCPServerStreamableHttp
from openai import OpenAI

# Your own OpenAI key / account — NOT a Yambr key
openai_client = OpenAI(api_key=os.environ["OPENAI_API_KEY"])

yambr_mcp = MCPServerStreamableHttp(
    params={
        "url": "https://api.yambr.com/mcp/computer_use",
        "headers": {"Authorization": f"Bearer {os.environ['YAMBR_API_KEY']}"},
    },
    name="yambr-computer-use",
)

agent = Agent(
    name="computer-user",
    instructions="Use the Computer Use tools to complete the user's task.",
    model="gpt-4o",                  # ← YOUR model, YOUR provider
    mcp_servers=[yambr_mcp],
)

result = await Runner.run(agent, "Create a pitch deck about coffee")
print(result.final_output)
```

Equivalent patterns exist for Anthropic's MCP tool support and for LangChain's `MultiServerMCPClient`. The rule: **model traffic = your provider**; **tool traffic = api.yambr.com**.

### C. Self-hosted LiteLLM / n8n / Cursor / Open WebUI

Register `https://api.yambr.com/mcp/computer_use` as an MCP server in your own tool layer:

* **LiteLLM (self-hosted)** — add under `mcp_servers` in `config.yaml`; see [LiteLLM integration](/integrations/litellm).
* **n8n** — MCP Tool node; see [n8n](/integrations/n8n).
* **Cursor** — MCP server entry in `settings.json`.
* **Open WebUI (self-hosted)** — add it alongside your local Computer Use Server as a second MCP tool.

All of these hand the model to your configured LLM provider; Yambr stays a tool provider.

## Session identity

Every request should set a chat id so each chat gets its own sandbox:

```
x-chat-id: <stable-per-conversation>
x-user-email: user@example.com        # optional, for per-user skills
```

Same `x-chat-id` across turns = same sandbox (files persist). New id = fresh container.

## Streaming and long tool calls

Long-running `bash_tool` / `sub_agent` calls stream SSE back over the same MCP connection with 15-second heartbeats. If a client closes the socket early the sandbox keeps running — the `sub_agent` tmux session is reconnectable from [chat.yambr.com](https://chat.yambr.com/)'s Terminal tab.

## Troubleshooting

| Symptom                                                  | Likely cause                                                                                                                             |
| -------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- |
| `401 Unauthorized`                                       | Key wrong, revoked, missing `Bearer ` prefix. Rotate at [app.yambr.com](https://app.yambr.com/).                                         |
| `404 Not Found` on `/v1/chat/completions`                | Expected — `api.yambr.com` does **not** expose chat completions. Point your LLM calls at your own provider.                              |
| `429 Too Many Requests`                                  | Per-key `max_parallel_requests=5`, or you've hit `max_budget` for the 30-day window. Check the dashboard.                                |
| `x-chat-id` ignored, tools fire against a shared sandbox | Header missing or your framework drops custom headers. Most MCP adapters have a `headers` or `extra_headers` option — set it there.      |
| Previews show as raw text in Open WebUI                  | Using stock `ghcr.io/open-webui/open-webui` — patches aren't applied. Self-host? See [Open WebUI integration](/integrations/open-webui). |

## Related

* [API keys](/platform/api-keys) — create and manage keys at app.yambr.com
* [Access model](/platform/access-model) — why we expose only MCP
* [cu.yambr.com](/platform/cu-endpoint) — public file/preview host
* [MCP API reference](/api-reference/introduction) — raw tool calls
