EN ▾
Get API key

deepseek4api.comGuide

Uncensored AI in VS Code: Continue, Cline and Cursor

A deepseek v4 api vscode setup comes down to three values: a base URL, an API key and a model ID. This guide shows exactly where to paste them in Continue, Cline and Cursor, how to test the connection first, and what to do when it fails.

Updated

Isometric illustration of a code editor panel connected by a cable to a glowing cloud node, representing an API endpoint

Key points

  • Any editor extension with a custom OpenAI-compatible provider works: use base URL https://api.deepseek4api.com/v1 and model ID uncensored.
  • Test with curl on GET /v1/models before touching the editor, so you know the key and URL are right.
  • The API supports chat completions only, so use it for chat, edits and agents, not for inline tab autocomplete.
  • A typical coding question with 8,000 tokens of context costs about $0.0017.

What you need before you start

Editors that let you bring your own model all ask for the same three things. Here they are for this service.

SettingValue
Base URLhttps://api.deepseek4api.com/v1
API keyYour key from the API key page, sent as Authorization: Bearer
Model IDuncensored
Provider type"OpenAI" or "OpenAI-compatible"

A quick clarification so nothing surprises you later. The name of this site mentions DeepSeek V4, but the model behind the endpoint is one open-weight model run by an independent provider. It is not DeepSeek's official API. In the editor you choose the generic OpenAI-compatible provider, never a vendor-specific one, because a vendor-specific provider points at that vendor's servers and ignores your base URL.

New users can claim $0.50 of trial credit with one click after signing up, no card needed, which is plenty for the tests below. The trial key runs at 2 concurrent requests and 60 requests per minute.

Test the endpoint from a terminal first

Half of all editor setup problems are a wrong URL or a mistyped key, and editors are bad at telling you which. Two curl commands remove the guesswork. Open the terminal inside VS Code (Ctrl+` on Windows and Linux, Cmd+` on macOS) and run the first one.

# expect the model id "uncensored" in the list
curl https://api.deepseek4api.com/v1/models \
  -H "Authorization: Bearer YOUR_API_KEY"

You should see a JSON list that includes the model uncensored. Now send a real chat request:

curl https://api.deepseek4api.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 linked list."}],
    "max_tokens": 300
  }'

If both work, the editor will work with the same values. If the first returns an authorization error, the key is wrong or has a stray space. If you get a 404, check that the URL ends in /v1 and has no extra path after it.

Continue in VS Code

Continue is an open-source assistant extension for VS Code and JetBrains. Install it from the Extensions view, open its panel, and open the configuration file from the gear icon. In current versions the file is config.yaml, and a model entry for this API looks like this:

models:
  - name: Uncensored API
    provider: openai
    model: uncensored
    apiBase: https://api.deepseek4api.com/v1
    apiKey: YOUR_API_KEY
    roles:
      - chat
      - edit
      - apply
    defaultCompletionOptions:
      contextLength: 100000
      maxTokens: 2000
      temperature: 0.4

Older Continue releases use a config.json with a models array instead, where the same fields appear as "provider": "openai", "model": "uncensored" and "apiBase": "https://api.deepseek4api.com/v1". The file format has changed between versions, so if your panel shows a different layout, follow the structure that Continue generated for you and swap in these three values.

The context length of 100000 matches the window of this API (prompt plus completion). The lower maxTokens value is a ceiling for each reply. It protects you from a long answer you did not need. Save the file, pick the model in the Continue chat dropdown, and ask a question about the file you have open. Highlight code and use the edit command to rewrite a selection.

Cline

Cline is an agent-style extension that reads files, proposes edits and runs commands with your approval. Open its settings, choose the API provider named "OpenAI Compatible", and fill in the fields:

  1. Base URL: https://api.deepseek4api.com/v1
  2. API Key: your key
  3. Model ID: uncensored

Agents are chatty. A single task can trigger a dozen requests as the tool reads files, edits them and checks the results, and every request re-sends the conversation so far. This is where the cost math matters. Suppose an agent step carries 40,000 tokens of context and writes 1,500 tokens. That costs 40,000 x $0.15 / 1M plus 1,500 x $0.50 / 1M, which is $0.006 plus $0.00075, or $0.00675. Twenty such steps for one task come to $0.135. Start new tasks instead of letting one conversation grow for hours, and your bill stays flat.

The API supports tool calling (tools, tool_choice and streamed tool_calls, with results returned as role: "tool"), which agent extensions rely on. Check the documentation for the exact request shape if you build your own agent.

Cursor and other editors

Cursor is a separate editor built on the VS Code codebase. It has a model settings page where you can enter your own OpenAI key and override the OpenAI base URL. Paste https://api.deepseek4api.com/v1 there, paste your key, and add a custom model named uncensored. Cursor's options and plan rules change from time to time, so check its current documentation for where the override sits and which features use it. Features that run on Cursor's own models, such as its tab completion, do not go through your endpoint.

The same approach works in any tool that offers a custom OpenAI-compatible provider: Zed, JetBrains plugins, Neovim plugins, terminal assistants and your own scripts. If a tool only accepts a fixed vendor list, look for an environment variable. Many OpenAI-based tools read OPENAI_BASE_URL and OPENAI_API_KEY, which you can set in your shell:

# base URL https://api.deepseek4api.com/v1, model uncensored
export OPENAI_BASE_URL="https://api.deepseek4api.com/v1"
export OPENAI_API_KEY="YOUR_API_KEY"
# then select the model name "uncensored" inside the tool

What works well and what does not

Be clear about the match between this API and coding workflows.

  • Works: chat about your code, explaining errors, writing functions, refactoring a selection, generating tests, drafting commit messages, agent tools that call functions.
  • Does not work: inline autocomplete that depends on fill-in-the-middle endpoints. The API exposes POST /v1/chat/completions and GET /v1/models only, so there is no legacy completions route. Keep another tool for tab completion if you rely on it.
  • Not offered: embeddings, so extensions that index your codebase with an embedding model need a separate embedding source. The same goes for image, audio and video generation, and fine-tuning.

The model is a general-purpose text model that does not refuse for lawful adult use. We make no benchmark claims for coding, so judge it on your own code. Use a low temperature for code, around 0.2 to 0.4, and give the extension a clear instruction about the language and style.

On cost, a coding question that sends 8,000 tokens of file context and gets a 1,000-token answer costs 8,000 x $0.15 / 1M plus 1,000 x $0.50 / 1M, which is $0.0012 plus $0.0005, or $0.0017. A hundred of those per working day over 22 days is 2,200 calls and $3.74. See the pricing page for the top-up tiers.

Troubleshooting common errors

SymptomLikely causeFix
401 or authorization errorWrong key, extra space, or key pasted in the wrong fieldRe-copy the key, then repeat the curl test
404 not foundBase URL missing /v1 or has a trailing pathUse exactly https://api.deepseek4api.com/v1
Model not foundModel name typed differentlyUse uncensored in lowercase
429 with concurrencyMore requests at once than your key allows (8 full, 2 trial)Lower the extension's parallel requests, or wait
429 with rate_limitedOver 300 requests per minute (60 on trial)Slow the agent or batch steps
429 with Retry-After: 5Temporary overloadRetry after five seconds
Request too largeBody over 8 MBSend fewer or smaller files as context

Streamed responses hold a concurrency slot until the stream ends, so if you open several chat panes at once with a trial key, you will meet the concurrency limit sooner than you expect. Check the X-RateLimit-Limit-Requests and X-RateLimit-Limit-Concurrency response headers to confirm what your key allows, and the X-Balance-USD header to see how much credit is left. Failed requests are not charged, so retries are free.

Questions and answers

Which model ID do I enter in VS Code?

Enter uncensored, in lowercase, with the base URL https://api.deepseek4api.com/v1 and your API key. Choose the OpenAI-compatible provider type in the extension.

Is this the official DeepSeek V4 API?

No. It is one open-weight model run by an independent provider, and it is not the official API of DeepSeek or any other vendor.

Can I use it for inline code autocomplete?

Not for fill-in-the-middle completion. The API offers chat completions and a model list only. It works for chat, edits and agent tools.

Why do I get 429 errors in an agent extension?

Agents send many requests at once. A full key allows 8 concurrent requests and 300 per minute, and a trial key allows 2 and 60. Reduce parallelism or retry after the Retry-After delay.

Your key is one form away

Create an account, copy the key, change the base URL. That is the whole setup.