Skip to content
All posts
·6 min readcursorbyoktutorialsetupvibe-coding

BYOK in Cursor: Cheap API Key Setup in 5 Minutes

Set up Cursor with your own API key (BYOK) using aiapi.cheap. One key for Claude, GPT, Gemini at 70-80% off. Step-by-step guide for vibe coders.

Why BYOK in Cursor?

Cursor Pro costs $20/month. That's $240/year before you've shipped anything.

If you're a vibe coder who lives in Cursor 6+ hours a day, that subscription disappears in two days of heavy use anyway — Cursor Pro caps how much you can actually call the model. Past the cap, you're paying for the privilege of waiting.

BYOK (Bring Your Own Key) flips that. Cursor lets you plug in your own API key, and now every keystroke uses *your* credits at *your* rate. With an sk-aic-* key from aiapi.cheap, that rate is 70-80% off the standard Anthropic and OpenAI pricing.

Same Cursor. Same Claude Sonnet 4.6, same GPT-4o. Smaller bill. And the same key works in Claude Code, raw scripts, LangChain — wherever.

This guide walks through it. 5 minutes, no theory.

What You Need Before Starting

  • Cursor installed (latest version — older builds may have different settings paths)
  • An aiapi.cheap account with at least $5 topped up
  • A generated sk-aic-* key from your dashboard
  • If you don't have an account yet, sign up here. Top up with crypto, generate your key, come back.

    Step-by-Step: Cursor BYOK Setup

    Step 1: Open Cursor Settings

    In Cursor, hit Cmd + , on Mac or Ctrl + , on Windows/Linux. The Cursor Settings panel opens.

    In the left sidebar, click Models (sometimes labeled "Models & API Keys" depending on your Cursor version).

    For the official documentation, see docs.cursor.com/settings/models.

    Step 2: Toggle OpenAI API Key Section

    Scroll down to the OpenAI API Key section. You'll see a toggle and an input field.

    Flip the toggle ON. The input field becomes editable.

    Why OpenAI section even though you're using Claude? Cursor routes most BYOK traffic through the OpenAI-compatible endpoint. aiapi.cheap exposes an OpenAI-compatible proxy at /v1/chat/completions that handles Claude, GPT, Gemini, Grok, and DeepSeek — all from the same base URL. One key, all 5 vendors, OpenAI-shaped requests.

    Step 3: Paste Your aiapi.cheap Key

    Paste your key into the input field:

    sk-aic-your-actual-key-here

    Don't click Verify yet. Cursor verifies against the *official* OpenAI endpoint by default — you need to override the base URL first.

    Step 4: Override the Base URL

    Look for Override OpenAI Base URL (or "Custom OpenAI Base URL" depending on Cursor version). Click it.

    A second input field appears. Paste:

    https://aiapi.cheap/api/proxy

    Save the override. Your requests now route through aiapi.cheap instead of OpenAI's official endpoint.

    Step 5: Verify the Key

    Click Verify next to the API key field. Cursor pings the endpoint with a test request.

    Green check = working. Red error = double-check the key and base URL for typos. The key starts with sk-aic- (not sk-ant- or any other prefix). The base URL has no trailing slash.

    Step 6: Pick Your Model

    In the model picker (top of the chat panel or in Settings → Models → Available Models), enable the models you want. Common picks for vibe coders:

  • claude-sonnet-4-6 — daily driver for code
  • gpt-4o — when Claude is being weird about a specific framework
  • claude-haiku-4-5 — fast autocomplete, cheaper per call
  • Cursor sends the model name straight through. aiapi.cheap routes it to the correct upstream vendor automatically. You don't switch keys when you switch models.

    Real Cost Comparison

    A solo founder running Cursor Agent Mode 6 hours a day, mostly Claude Sonnet:

    | Setup | Monthly cost | Notes |

    |-------|--------------|-------|

    | Cursor Pro subscription | $20 + cap overage | Hit limits ~Day 8 |

    | Cursor Pro + Claude API at full price | ~$120-180 | Pro fee + actual usage |

    | Cursor BYOK + aiapi.cheap Pro | $19 (one-time) + ~$30-50 in API spend | No monthly fee, no cap |

    Heads up: Cursor's tab autocomplete (the inline AI suggestions while typing) still requires a Cursor Pro subscription — that's tied to their own infrastructure, not BYOK. With an aiapi.cheap key, you save on chat / agent / inline-edit calls — which are the bulk of cost.

    The sk-aic-* key isn't locked to Cursor. The same key powers Claude Code in your terminal. So you're not paying for two subscriptions.

    More numbers in the solo founder cost breakdown.

    Switching Vendors Mid-Session

    This is the part that sells it.

    You're debugging a React thing. Claude is hallucinating about a Next.js 16 API. In Cursor, click the model dropdown, pick gpt-4o, send the same question. Different vendor, same key, same bill.

    No new account. No new credit card. No "please verify your phone number" nonsense.

    For more on the multi-AI-via-one-key model, see the multi-AI overview.

    Common Issues

    "Invalid API key" on verify. Check that you copied the full key, including the sk-aic- prefix. Check that Override OpenAI Base URL is filled in correctly with no trailing slash.

    Verify works but chat fails. Make sure the specific model name you selected matches one we support. If you're seeing a 404 on a model name, check the docs for current model identifiers.

    Streaming feels chunky. Cursor streams over SSE. aiapi.cheap supports streaming natively. If responses are arriving in big blocks, your network might be buffering somewhere — try disabling any local proxy/VPN as a sanity check.

    "Cap exceeded" errors. That's not us. Cursor enforces its own client-side rate limits sometimes even on BYOK. Restart Cursor and try again.

    Why This Matters for Vibe Coders

    A vibe coder doesn't want to think about which AI service they're talking to. They want to type, get an answer, ship.

    Cursor + BYOK + aiapi.cheap collapses 4 vendor accounts into 1 key, 1 base URL, 1 dashboard showing exactly what you spent. You stop budgeting per-tool and start budgeting per-feature shipped.

    And because the same key works in Claude Code (covered in Claude Code vs Cursor for solo founders), you can hop between IDE-style coding (Cursor) and terminal-style coding (Claude Code) without juggling credentials.

    What Next

    1. Test with a small task. Ask Cursor to refactor one function. Confirm it works.

    2. Watch your aiapi.cheap dashboard. You'll see the request show up in seconds.

    3. Switch models mid-task. Try Claude Sonnet 4.6 for logic, Haiku 4.5 for boilerplate.

    4. If you're sold, upgrade to Pro for 80% off and 500 RPM.

    Full setup details and additional SDK examples in the docs.

    That's it. No subscription you forgot to cancel. No cap surprises. Just code.