What you are setting up
Cursor is an editor that supports custom model providers. If you give it an OpenAI-style base URL, a key and a model name, it will send its chat requests there instead of to its default provider. This service speaks that protocol: POST /v1/chat/completions with Bearer authentication, plus GET /v1/models.
Two things to be clear about up front. This is an independent API running one open-weight model, not OpenAI's Codex and not an official product of Cursor. And Cursor changes its settings screens often, so the labels below may sit in a slightly different place in your version. The three values never change: base URL, key, model name.
Step 1: get a key and test it outside Cursor
Sign up on the API key page with Google or with email and password. New accounts can claim $0.50 of trial credit with one click, valid for 7 days, no card needed. That is enough to test an editor setup.
Before touching Cursor, confirm the key works. A failure inside an editor is harder to read than a failure in a terminal.
curl https://api.getcodexapi.com/v1/chat/completions \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "uncensored",
"messages": [{"role": "user", "content": "Write a Python function that reverses a string."}]
}'
If you get a JSON reply with code in it, move on. If you get an error instead, fix it here first. Common causes are a missing character in the key or a space pasted at the end.
Step 2: configure Cursor
- Open Cursor's settings and go to the models section.
- Find the field for an OpenAI API key and paste your key from this service.
- Turn on the option to override the OpenAI base URL, and enter
https://api.getcodexapi.com/v1. - Add a custom model and type the exact name
uncensored. - Run the verify button if there is one, then open a chat panel and select
uncensoredfrom the model list.
If the verify step reports a failure, check three things in order: the base URL ends in /v1 with no endpoint path after it, the key was pasted without trailing whitespace, and the model name has no capital letters. The guide on the docs page lists the same values with extra client examples.
One thing to plan around: the override is a setting, not a per-model choice, so if you also use your own OpenAI key elsewhere in Cursor, switch the override off first. Keep a note of what you changed.
After saving, ask the model a simple coding question in chat and watch for the reply. A slow first answer is normal while Cursor builds its request. If the answer comes back, you are connected, and the next step is to try it on real work in your own repository.
What will and will not go through your key
Cursor mixes several features. Chat and inline edit requests are the ones most likely to use your custom model once you select it. Other features, such as tab completion, have historically used models that Cursor runs itself, and agent-style features may depend on how Cursor handles tools. The honest way to know is to try the feature you rely on and watch your balance.
That is easy to do: every response from this API carries an X-Balance-USD header, and your balance is visible in your account. If you send a chat message and the balance does not move, that request did not go to us.
Tool calling is supported on this endpoint (tools, tool_choice, streamed tool_calls, and results as role: "tool"), which is what editor agents need. Streaming works over server-sent events with stream: true. The context window is 100,000 tokens, prompt and completion combined, so a large file plus its neighbours fits in one request.
Why use an uncensored model in an editor
Most coding work never hits a refusal. When it does, it tends to be for legitimate tasks that look risky to a cautious filter: writing a port scanner for your own network, parsing malware samples you are analysing, generating test data that includes offensive language, building the back end of a roleplay or companion app for adults, or refactoring code that deals with content moderation. This model is tuned to answer without content refusals for lawful adult use.
It is still one general open-weight model, not a specialist code model, and nothing here promises that it beats any particular alternative on your codebase. Run your own tasks through it. One rule is fixed: no sexual content involving minors, and that cannot be changed.
What it costs in practice
Pricing is $0.15 per 1M input tokens and $0.50 per 1M output tokens, from prepaid credit with no subscription. Editor traffic is input-heavy, because every request resends file context.
A request with 8,000 input tokens and 1,000 output tokens costs 8,000 x $0.15 / 1,000,000 = $0.0012 for input, plus 1,000 x $0.50 / 1,000,000 = $0.0005 for output, which is $0.0017. If you make 150 of those in a heavy day, that is 150 x $0.0017 = $0.255, about 26 cents.
A request that sends 40,000 tokens of context and gets 1,500 back costs $0.006 + $0.00075 = $0.00675. Top-ups start at $20 and credit never expires, so there is no pressure to use it up. See the pricing page for bonus tiers, and the coding API page for the general overview.
Rate limits for editor use
A full key allows 8 concurrent requests and 300 requests per minute. A trial key allows 2 concurrent and 60 per minute. One person typing in one editor rarely gets near either, but a team sharing one key, or an agent that fires many requests in parallel, can. When you go over, the API returns HTTP 429. The code rate_limited means too many requests per minute, and concurrency means too many at the same time. If the service is briefly overloaded you also see a 429 with Retry-After: 5.
A streamed chat holds its concurrency slot until the stream ends. For shared use, give each developer their own key instead of one key for the team.
Troubleshooting checklist
- Model not found. Re-type
uncensoredwith no spaces. Remove old custom models you do not use. - Auth error. Re-copy the key. Make sure Cursor is not still using a key from another provider.
- Replies stop early. Check whether Cursor sets its own output cap. On our side,
max_tokensis optional. - Nothing changes in your balance. The feature you used is not routed through your custom key. Try chat instead.
- Frequent 429. Lower parallel requests, or use a full key rather than a trial key.
