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

> ## Agent Instructions
> Phaseo Gateway base URL: https://api.phaseo.app/v1. Send `Authorization: Bearer $PHASEO_API_KEY` with every request.
> Model IDs look like `provider/model`, for example `openai/gpt-6-astra`. Do not guess IDs: list them with `GET /v1/models` or check https://phaseo.app/models. `phaseo/free` routes to an available free model and needs no wallet balance.
> For new text integrations prefer `POST /v1/responses`. `POST /v1/chat/completions` (OpenAI format) and `POST /v1/messages` (Anthropic format) suit existing code.
> The full API contract is https://phaseo.app/docs/openapi/v1/openapi.yaml. Official SDKs: `@phaseo/sdk` (TypeScript) and `phaseo` (Python), plus Go, C#, PHP, Ruby and Rust.
> Search these docs over MCP at https://phaseo.app/docs/mcp, and install Phaseo skills with `npx skills add https://phaseo.app/docs`. If a page is wrong or out of date, report it with the MCP `submit_feedback` tool.
> Manage Phaseo accounts with the `phaseo` CLI (`npm install -g @phaseo/cli`, then `phaseo login` or `phaseo login --device-code`), the `/v1` Management API or the MCP server at `https://mcp.phaseo.app/mcp?access=manage`. Do not send users to the dashboard for account tasks. A person is still needed for sign-up, approving a sign-in, paying the first top-up on the checkout link that `phaseo credits add` returns when no card is saved, confirming each saved-card top-up from the emailed link, and account security (password, MFA, passkeys). Create API keys with `phaseo keys create --name <name> --json`; never guess one. Credit top-ups need `phaseo login --scopes billing:write` first. Task map: https://phaseo.app/docs/v1/developers/manage-from-an-agent.md.

# Cursor

> Connect Cursor to Phaseo through its OpenAI API key and Base URL override settings.

Use this guide to route supported Cursor chat models through Phaseo. Use the Phaseo CLI to create and revoke a dedicated key, then finish setup in Cursor, or provide your own Phaseo key and follow the same manual settings.

## Set up with the Phaseo CLI

```bash theme={null}
phaseo login
phaseo cursor --model openai/gpt-5.6-terra
```

Setup creates a `Phaseo CLI: Cursor API Key` that expires after 90 days and has a \$100 monthly spend limit, and prints the settings below. Run `phaseo cursor` again to get a new key after it expires. It does not edit Cursor's private credential store.

## Configure Cursor

1. Open **Cursor Settings**.
2. Select **Models**.
3. Find the **OpenAI API Key** section and enable it.
4. Copy the dedicated key:

```bash theme={null}
phaseo integrations credential cursor
```

5. Paste the key into Cursor's OpenAI API key field.
6. Enable **Override OpenAI Base URL**.
7. Enter `https://api.phaseo.app/v1` without a trailing slash.
8. Add or enable the Phaseo model you want to use.

| Cursor field | Value |
| - | - |
| OpenAI API Key | Output of `phaseo integrations credential cursor` |
| Override OpenAI Base URL | `https://api.phaseo.app/v1` |
| Model | A Phaseo model ID supported by the Cursor field |

Cursor's current custom-provider controls are global rather than provider-specific. The model name is forwarded to the configured endpoint, while the enabled API key and Base URL determine where the request is sent.

> [!WARNING]
>
> Cursor currently applies the OpenAI Base URL override broadly. Turn the override off before switching back to Cursor-hosted models if those models fail while Phaseo is enabled. Cursor may also reject custom IDs that collide with built-in model names or do not fit its OpenAI-family routing.

## Verify

1. Keep the Phaseo key and Base URL override enabled.
2. Select the configured model in Cursor's model picker.
3. Start a new chat and ask it to reply with `PHASEO_CURSOR_OK`.
4. Confirm the request appears in Phaseo activity or logs.

Cursor's standard chat path is the relevant compatibility target. Features that use Cursor-specialized models, including tab completion, may continue to use Cursor's own infrastructure.

## Remove

First disable the OpenAI API key and Base URL override in **Cursor Settings → Models**. Then revoke the dedicated Phaseo key:

```bash theme={null}
phaseo integrations remove cursor
```

Removal cannot clear Cursor's secure credential storage automatically. If the key remains visible as configured, delete it from Cursor's Models settings.

## Troubleshooting

### Cursor-hosted models stop working

Disable **Override OpenAI Base URL** before selecting a Cursor-hosted model. Cursor currently does not isolate a custom Base URL per model.

### The model is rejected

Try a Phaseo model that Cursor accepts as an OpenAI-family custom model. Cursor can reject IDs that collide with its built-in catalog, and model IDs containing provider prefixes may not be accepted in every release.

### No Verify button appears

Some Cursor releases save the key without a separate Verify action. Enter the key and Base URL, then test them with a new chat.

### Authentication fails

Run `phaseo integrations credential cursor` again, replace the value stored in Cursor, and ensure the Base URL is exactly `https://api.phaseo.app/v1`.

## Related

* [Cursor API key documentation](https://docs.cursor.com/settings/api-keys)
* [Coding Agents](https://phaseo.app/docs/v1/guides/integrations/coding-assistants.md)
* [Models](https://phaseo.app/docs/v1/api-reference/endpoint/models.md)


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