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

> ## Agent Instructions
> For agents: install the OpenWork desktop app with `brew install --cask openwork` (macOS) or from https://openworklabs.com/download. Do not run `npx openwork`; the npm package named `openwork` is a different project.
> Connect an agent to OpenWork with the MCP Gateway: `claude mcp add --transport http openwork https://api.openworklabs.com/mcp/agent`. Teams sign up at https://app.openworklabs.com?mode=sign-up.
> Step-by-step agent guide: https://openworklabs.com/docs/start-here/use-openwork-from-an-ai-agent.md
> Connect Slack (any organization admin): https://openworklabs.com/docs/slack/connect-slack.md. OpenWork in Slack (@openwork bot) is private alpha for approved organizations. Setup guide: https://openworklabs.com/docs/slack/overview.md. Agent skill: https://openworklabs.com/.well-known/agent-skills/set-up-openwork-slack/SKILL.md.

# Use Cursor with AI Gateway

> Point Cursor at your organization's AI Gateway and add your models by name.

With an [AI Gateway API key](https://openworklabs.com/docs/ai-gateway/third-party-tools.md) you can use the
models your organization gives you in Cursor's chat and agent. Requests go
through AI Gateway like any other: the key only reaches models you're allowed,
and usage counts toward your limit.

Your organization needs **Allow 3rd party tools & harnesses** turned on, and
Cursor setup available.

## Set it up

Create a key in **My Library › Models** and pick **Cursor** under **Start using
this key**: it shows everything to paste, with your key filled in. Already have
a key? Open **Set up Cursor** in the same section.

1. **Create an API key.** Select **Create key**, name it (`Cursor on my laptop`)
   and copy it. It's shown once.
2. **Point Cursor at OpenWork.** In Cursor, open **Settings › Models › API
   Keys**. Turn on **OpenAI API Key** and paste your key. Turn on **Override
   OpenAI Base URL** and paste the base URL from the page. It ends in
   `/api/v1/cursor`.
3. **Add your models.** Choose a model on the page and copy its name, for
   example `openwork/claude-opus-5.5-k3f9`. In Cursor's **Models** settings,
   select **Add model** and paste it. Repeat for each model you want.
4. **Pick a model and run locally.** Open Cursor's model picker, select one you
   added, and run the agent on **This Mac** (Local), not in the Cloud.

> [!WARNING]
>
> Use Cursor's **Local** mode. Cursor's cloud agents don't work with OpenWork
> models yet: a prompt sent to the Cloud fails. Choose **This Mac** under the
> prompt box before you send.

> [!WARNING]
>
> The base URL must end in `/api/v1/cursor`, not `/api/v1`. The Cursor address
> answers in the formats Cursor expects for every model, including Claude and
> Gemini models.

## Model names

Cursor has one field per model, used both as its id and as the name it shows.
OpenWork gives each of your models a short name for it:

```text theme={null}
openwork/<model name>-<4 characters>
```

The four characters tell apart models with the same name, for example the same
model from two providers. Copy names from the page rather than typing them.

## Thinking level

Cursor doesn't send a thinking level for models added this way, so the level is
part of the name. On the page, choose a level next to a model and copy the name
it shows:

```text theme={null}
openwork/claude-opus-5.5-k3f9:high
```

Without a level, the model uses its provider's default. To switch between
levels in Cursor, add the same model once per level.

## Good to know

* **Tab completions** and Cursor's own models keep using your Cursor plan.
* **Cursor calls the base URL from its own servers.** A self-hosted AI Gateway
  has to be reachable from the internet for Cursor to use it. If it isn't,
  Cursor says the model you selected isn't available.
* While the override is on, Cursor sends its OpenAI models to the base URL too.
  Only the names from the page work there.

## When it doesn't work

| Cursor shows | What to do |
| - | - |
| `invalid_api_key` | The key was revoked, has expired, or 3rd party tools are off for your organization. Check it in **My Library › Models**. |
| `invalid_cursor_model` | The model name isn't an OpenWork one. Copy it again from **Set up Cursor**. |
| `model_not_found` | You no longer have that model. Open **Set up Cursor** to see your current models. |
| A prompt fails in a cloud agent | Switch the agent to **This Mac** (Local). Cloud agents don't work with OpenWork models yet. |
| `unsupported_thinking_level` | That model doesn't have the level in the name. Copy the name again with a level from the page. |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.