Last updated
Use Your Own API Key in VS Code Extensions
Many VS Code extensions let you swap the built-in model for your own. To use own api key in editor tools, you enter three values: a base URL, a key and a model ID. This page shows each one and how to test it before you open the editor.

Summary
- You need three values: base URL, API key and model ID uncensored.
- Test the key with curl first, so you know a failure is in the editor, not the key.
- The base URL ends at /v1; extensions add the path themselves.
- Editors send a lot of context per request; a typical call costs a fraction of a cent.
What you need before you open settings
| Setting | Value |
|---|---|
| Base URL | https://api.copilotapikey.com/v1 |
| API key | Your key from the API key page |
| Model ID | uncensored |
| Provider type | OpenAI or OpenAI-compatible |
Extensions name these fields differently. Look for "OpenAI-compatible", "Custom OpenAI", "API base", "Base URL" or "Endpoint". The model field is often a free text box; if the extension insists on a dropdown, look for an option that lets you type your own model name.
Extensions such as Continue, Cline and Roo Code are known to support custom OpenAI-compatible endpoints. Menus and file formats change between versions, so treat the examples here as a guide and check the extension's own documentation.
Step 0: prove the key works outside the editor
When a setup fails, you want to know which part is broken. Run this in a terminal first. If it prints a reply, the key, URL and model are fine and any later error comes from the editor's settings.
curl https://api.copilotapikey.com/v1/chat/completions \
-H "Authorization: Bearer $UNCENSORED_KEY" \
-H "Content-Type: application/json" \
-d '{"model":"uncensored","messages":[{"role":"user","content":"Reply with the word ready."}]}'You can also check the key and balance with GET /v1/models or GET /v1/balance. HTTP 401 means the key is wrong, and 429 means you hit a rate limit.
No key yet? Sign up on the key page and claim the $0.50 trial credit. It is valid for 7 days and needs no card.
Example: a config file entry
Some extensions use a YAML or JSON file. A Continue-style entry looks like this. Field names can differ in your version, so match them to the extension's current docs.
# ~/.continue/config.yaml (example, check current field names)
models:
- name: Uncensored
provider: openai
model: uncensored
apiBase: https://api.copilotapikey.com/v1
apiKey: YOUR_KEY
roles:
- chatIf the extension reads keys from environment variables, use that instead of pasting the key into a file. Then the file can go into version control without leaking anything. In a shared team repo, never commit the key.
Example: a settings panel
For extensions with a settings UI, the steps are nearly always the same:
- Open the extension's settings and choose the provider type "OpenAI Compatible" (or similar).
- Paste the base URL. Keep the
/v1at the end and do not add/chat/completions; the extension appends the path. - Paste your key.
- Type
uncensoredas the model ID. - Save, open the extension's chat panel and send a short test message.
Settings that suit coding and writing
Editor assistants behave better when you tune two numbers. For code, set the temperature low, around 0.2, so that suggestions are steady and repeatable. For drafting prose or fiction inside an editor, a range of 0.7 to 1.0 gives more variety. If the extension exposes a max tokens field, set it high enough that long edits are not cut off, and watch for replies that stop mid-sentence.
Context matters too. The window is 100,000 tokens for prompt and reply together. Extensions that attach many files can fill it, which also raises the price of each call, so attach only what the task needs.
Teams and shared machines
Give each developer a separate key. Accounts that have topped up can hold up to 5 keys with labels, so one for each person or machine is practical for a small team. If a laptop is lost, revoke that one key and nothing else changes. You can also regenerate a key from the key page at any time.
Do not paste a key into a settings file that lives in a repository. Use the extension's secret storage or an environment variable instead.
Confirm the editor is really using your key
Some extensions fall back to a built-in model when a custom endpoint is misconfigured, so a reply in the chat panel does not prove your key is in use. Check the balance before and after one test message.
curl https://api.copilotapikey.com/v1/balance \
-H "Authorization: Bearer $UNCENSORED_KEY"Send a short message in the editor, run the same command again, and compare the two numbers. A short test costs a fraction of a cent, so the balance should drop by a tiny amount. If it does not move, the extension is not calling this service. Recheck the provider type, the base URL and the model ID, and look for a second place in the settings (a per-feature override, for example) that still names another model.
Fixing the usual errors
| Symptom | Likely cause | Fix |
|---|---|---|
| 401 Unauthorized | Wrong or revoked key | Copy the key again; regenerate it on the key page if unsure |
| 404 Not Found | Base URL has an extra or missing path | Use the base URL exactly, ending in /v1 |
| Model not found | Model ID typed differently | Use uncensored, lowercase |
| 429 rate_limited or concurrency | Too many requests at once | Reduce parallel features; a full key allows 8 at once and 300 per minute |
| Reply stops mid-way | Output cap too low in the extension | Raise its max tokens setting |
Agent-style extensions can fire several requests at once while they read files and plan edits. On a trial key you have 2 concurrent requests and 60 per minute, which such tools can hit quickly. A full key raises those to 8 and 300. The docs list the headers that report your limits.
What it costs to code with your own key
Editors send file contents and chat history with each request, so input dominates. Take a call with 20,000 input tokens and 1,000 output tokens. Input: 20,000 ÷ 1,000,000 × $0.15 = $0.003. Output: 1,000 ÷ 1,000,000 × $0.50 = $0.0005. Total $0.0035.
If you make 100 such calls a day for 22 working days, that is 2,200 calls and $7.70. A light user will spend far less. Prices are $0.15 per 1M input and $0.50 per 1M output tokens, from prepaid credit, with no subscription, no charge for failed requests and no expiry. Top up with any whole amount from $20 to $500 in USDT on TRC20 or USDC on Base. See the pricing page for bonuses.
The context window is 100,000 tokens. Two things to keep in mind: this service does text chat only, so features that need embeddings or a dedicated autocomplete model may not work with it, and you should keep one key per machine so you can revoke a lost laptop's key without touching the others. For a comparison with another vendor's key, see the Claude API key versus an uncensored alternative.
More guides
Common questions
Which VS Code extensions accept a custom endpoint?
Continue, Cline and Roo Code are known to support OpenAI-compatible endpoints. Check each extension's documentation for the current setup.
What do I put in the model field?
Type uncensored. It is the only model ID on this service.
Should the base URL end with /chat/completions?
No. End it at /v1. The extension adds the rest of the path.
Does it work for tab autocomplete?
This service provides chat completions, so use it for chat and edit features. Check whether your extension supports chat models for autocomplete.
Generate your token
Register, grab the key, update the base URL. That covers everything.