# How to use your own API key in Cursor

Authors: AutoRouter
Author profile: https://autorouter.com/about
Published: 2026-11-16T13:45:00.000Z
Reading time: 6 min
Canonical: https://autorouter.com/blog/cursor-api-key
Publisher: AutoRouter, the Mac app that routes Codex, Claude Code and other AI tools to every model (https://autorouter.com)

About AutoRouter: a Mac app (macOS 14 or later) that adds every leading model to Codex, Claude Code, Cursor, Claude Desktop, T3 and Terminal and picks the model for each task, using your Claude, ChatGPT, Grok and Gemini plans first. Install from https://autorouter.com/AutoRouter.dmg, or ask your agent to follow https://autorouter.com/setup.md. Routing across your plans is free; Pro is $50 a month with $20 of included usage. Unrelated to OpenRouter's Auto Router.

> To use your own API key in Cursor, open Cursor Settings > Models, paste a key for OpenAI, Anthropic, Google, Azure OpenAI or AWS Bedrock, and click Save. On individual plans your provider bills those requests and they don't touch Cursor's included usage; on Teams and Enterprise, Cursor adds $0.25 per million tokens on eligible models. Your own key doesn't work on Plus, doesn't cover Tab completion and isn't covered by Cursor's Zero Data Retention policy.

## Key facts

- Cursor takes your own keys for OpenAI, Anthropic, Google, Azure OpenAI and AWS Bedrock under Cursor Settings > Models ([Cursor, checked November 13, 2026](https://cursor.com/help/models-and-usage/api-keys)).
- On individual plans, requests on your own key don't draw from included usage or prepaid credit. On Teams and Enterprise, eligible third-party models carry the Cursor Token Rate of $0.25 per million tokens, including on your own key.
- Plus ($8 a month) doesn't allow your own API keys, and custom keys never cover Tab completion.
- Cursor's Zero Data Retention policy doesn't apply to requests on your own key; your provider's policy does.

![Add your own API key in four steps. 1. Open Cursor Settings (Then Models); 2. Find the provider (One of five); 3. Paste your key (One provider at a time); 4. Click Save (Its models join the picker). Source: Cursor's API key and pricing docs, checked November 13, 2026.](https://autorouter.com/blog/images/cursor-api-key/1-add-a-key.png)

As of November 13, 2026, you add your own API key in Cursor under **Cursor Settings > Models**: find the provider (OpenAI, Anthropic, Google, Azure OpenAI or AWS Bedrock), paste the key and click **Save**, as [Cursor's API key page](https://cursor.com/help/models-and-usage/api-keys) describes. That provider's models then appear in the model picker and are billed to your provider account. Cursor's Plus plan doesn't allow your own keys, Tab completion keeps using Cursor's own models, and on Teams and Enterprise a $0.25 per million token rate still applies to eligible models. For Cursor's plans and resets, see [Cursor usage limits by plan](/blog/cursor-usage-limits).

## How do you add your own API key in Cursor?

You add a key in Cursor's settings, one provider at a time:

1. Open **Cursor Settings** and go to **Models**.
2. Find the provider you want: OpenAI, Anthropic, Google, Azure OpenAI or AWS Bedrock.
3. Paste your API key into the provider's field.
4. Click **Save**. The provider's models appear in the model picker.

For AWS Bedrock you can use access and secret keys in the editor, or set up IAM roles from the Cursor dashboard ([setup guide](https://cursor.com/docs/customizing/aws-bedrock)). If a key is invalid or the provider rejects it, requests to that provider fail until you update or remove the key.

## Which providers and plans support your own API key in Cursor?

Five providers take your own key, and only chat models use it: "Tab completion continues using Cursor's built-in models," [Cursor's help page](https://cursor.com/help/models-and-usage/api-keys#what-providers-are-supported) says.

| Provider     | What your key covers                                        |
| ------------ | ----------------------------------------------------------- |
| OpenAI       | Standard, non-reasoning chat models; the picker shows which |
| Anthropic    | All Claude models available through the Anthropic API       |
| Google       | Gemini models available through the Google AI API           |
| Azure OpenAI | Models deployed in your Azure OpenAI Service instance       |
| AWS Bedrock  | Models available in your Bedrock configuration              |

Plan support follows from Cursor's [plan list](https://cursor.com/docs/models-and-pricing#plans), which says Plus has "no Auto, Cloud Agents, Automations, Bugbot, Origin, third-party models, or your own API keys."

| Plan                    | Own API key                 | Cursor charge on top of your provider's bill                     |
| ----------------------- | --------------------------- | ---------------------------------------------------------------- |
| Plus ($8/month)         | Not available               | Not applicable                                                   |
| Premium, Super, Ultra   | Yes                         | None                                                             |
| Legacy Pro, Pro+, Ultra | Yes                         | None                                                             |
| Teams and Enterprise    | Yes                         | Cursor Token Rate of $0.25 per million tokens on eligible models |
| Free and legacy Hobby   | Not stated in Cursor's docs | Not stated                                                       |

## What does a request on your own API key cost?

On an individual plan, a request on your own key costs whatever your provider charges and nothing from Cursor. On Teams and Enterprise, Cursor adds its [Token Rate](https://cursor.com/docs/models-and-pricing#cursor-token-rate) of $0.25 per million tokens on input, output and cached tokens, unless the model's cache-read price is strictly below $0.10 per million tokens on every pricing tier. Cursor charges only that rate for those tokens, so you aren't billed twice for the model.

![Only Teams and Enterprise add Cursor's token rate. Which Cursor plan are you on? Plan Plus: No own keys; Plan Premium, Super or Ultra: Nothing; Plan Teams or Enterprise: $0.25 per million tokens. Source: Cursor's API key and pricing docs, checked November 13, 2026.](https://autorouter.com/blog/images/cursor-api-key/2-who-pays.png)

To put numbers on it, AutoRouter priced one agent request (8,000 fresh input tokens, 40,000 cache-read tokens and 2,000 output tokens, 50,000 in all) at the Anthropic list prices Cursor shows as of November 13, 2026, leaving out cache writes. The request size is our assumption.

| Model                                          | Provider bills you | Cursor adds on an individual plan | Cursor adds on Teams                |
| ---------------------------------------------- | ------------------ | --------------------------------- | ----------------------------------- |
| Claude Opus 5.5 ($4 / $0.20 / $20 per million) | $0.080             | $0                                | $0.0125                             |
| Claude Sonnet 5.5 ($2 / $0.10 / $10)           | $0.040             | $0                                | $0.0125                             |
| Claude Haiku 5.5 ($0.10 / $0.01 / $0.50)       | $0.0022            | $0                                | $0 (cache read under $0.10, exempt) |

Sonnet 5.5's cache-read price of exactly $0.10 per million is not strictly below the threshold, so it pays the rate. On a team, the $0.0125 adds about 16% to an Opus 5.5 request of this shape and about 31% to a Sonnet 5.5 request.

## What doesn't work with your own API key in Cursor?

- **Tab completion.** It always runs on Cursor's built-in models.
- **Zero Data Retention.** Cursor's ZDR policy doesn't apply to requests on your own key; your provider's privacy policy governs them. Cursor tells teams that rely on ZDR to use its built-in models ([Cursor](https://cursor.com/help/models-and-usage/api-keys#does-cursors-zero-data-retention-policy-apply-when-using-my-own-api-keys)).
- **Local-only requests.** Your key is sent to Cursor's backend with every request, because Cursor builds the final prompt on its servers. Cursor says the key is sent over encrypted connections and isn't stored after the request.
- **The Plus plan.** Plus runs Cursor's own models only.

## How else can you use other models in Cursor?

Without your own key, Premium, Super and Ultra let you pick Claude, GPT and Gemini models directly, billed at API list price from prepaid credit from the first request ([Cursor](https://cursor.com/docs/models-and-pricing#third-party-models)). Auto picks a model for you, in Cost mode on individual plans.

| Option                            | Who bills the model               | Plans                                                      | Uses Cursor's included pool                               |
| --------------------------------- | --------------------------------- | ---------------------------------------------------------- | --------------------------------------------------------- |
| Your own API key                  | Your provider                     | Premium and above, legacy Pro and above, Teams, Enterprise | No                                                        |
| Third-party model from the picker | Cursor, from prepaid credit       | Premium and above                                          | No (legacy Pro and above draw from the Other Models pool) |
| Auto, Cost mode                   | Cursor, as a Cursor-model request | Paid plans except Plus                                     | Yes                                                       |

AutoRouter, the Mac app for Codex and Claude Code, also works with Cursor. You enable Cursor in [AutoRouter](https://autorouter.com)'s setup, and while AutoRouter is the model selected it sends each task to the model that does it best; you can still pick a specific model any time. [Cursor Auto mode vs Copilot auto vs AutoRouter](/blog/auto-mode-vs-autorouter) compares it with Cursor's Auto.

## Questions

### Does my own API key count against Cursor's included usage?

Not on individual plans: your provider bills the model cost, and the requests don't draw from included usage or prepaid credit. On Teams and Enterprise, the Cursor Token Rate on eligible models comes out of the team's prepaid credit, or the Other Models allowance on a legacy Teams plan.

### Can I point Cursor at a custom base URL or proxy?

Cursor's current API key help page, checked November 13, 2026, lists five providers and doesn't document a custom base URL. Check **Cursor Settings > Models** in your version, and treat any older guide that describes one as possibly out of date.

### Is my API key stored on Cursor's servers?

Cursor says no. The key travels to Cursor's backend with each request over an encrypted connection and isn't persisted after the request completes.

### Why do my requests fail after adding a key?

An invalid key, or one your provider rejects, makes every request to that provider fail until you update or remove it. Check that the key is active and has access to the model you picked, and on OpenAI that the model is one of the standard chat models Cursor supports.

## Sources

- [Bring your own API key](https://cursor.com/help/models-and-usage/api-keys), Cursor, checked November 13, 2026
- [Models & Pricing](https://cursor.com/docs/models-and-pricing), Cursor, checked November 13, 2026
- [Usage and limits](https://cursor.com/help/models-and-usage/usage-limits), Cursor, checked November 13, 2026
- [Cursor Token Rate](https://cursor.com/help/models-and-usage/token-rate), Cursor, checked November 13, 2026
- [AWS Bedrock setup](https://cursor.com/docs/customizing/aws-bedrock), Cursor, checked November 13, 2026

## Read next

- [How Claude Code plan mode works, and which model plans](https://autorouter.com/blog/claude-code-plan-mode.md): Claude Code plan mode has Claude read your code and propose a plan without editing any files until you approve it. Turn it on with Shift+Tab, by starting a prompt with /plan, or with claude --permission-mode plan. Planning runs on your session's model unless you pick opusplan, which plans on Opus and builds on Sonnet; AutoRouter, the Mac app for Codex and Claude Code, instead picks a model for each turn while it is selected.
- [How to run multiple agents in Claude Code](https://autorouter.com/blog/claude-code-multi-agent.md): Claude Code runs multi-agent work in two ways inside a session: subagents, which work in their own context and report back to the main conversation, and agent teams, an experimental mode where a lead session coordinates teammates that share a task list and message each other. Every agent's requests count toward the same usage limits, so the model each agent runs on is the main cost lever. AutoRouter, the Mac app for Codex and Claude Code, picks a model for each turn in the main conversation.
- [Try a new model in Codex or Claude Code without another API key](https://autorouter.com/blog/try-new-models-in-codex-and-claude-code.md): Every manual way to try a new model in Codex or Claude Code needs an API key: one per provider, or one gateway key such as OpenRouter's. Claude Code reaches another provider through environment variables, and Codex through a custom provider in config.toml. AutoRouter, the Mac app for Codex and Claude Code, adds 20+ models to both apps' model pickers with no keys or endpoints to set up, and new models show up there right away.

Tags: [Models](https://autorouter.com/blog/tags/models.md), [Guides](https://autorouter.com/blog/tags/guides.md)

Drafted with AI from the sources linked above, then checked and edited by the AutoRouter team.
