getdeepseekapi.comGuide
Uncensored AI API for Coding: Setup, Cost, Limits
Wondering how to use DeepSeek API for coding with an endpoint that will not refuse security or scraping questions? This service is not DeepSeek's own API, but it is an OpenAI-compatible endpoint for one uncensored open-weight model, and it handles code tasks through the same chat calls.
Updated
Key points
- The model ID is
uncensored, the base URL is https://api.getdeepseekapi.com/v1, and any OpenAI SDK works. - Refusals matter most for security testing, reverse engineering, scraping and malware analysis, all for lawful use.
- A 50,000-token codebase review costs under one cent in input; a 30-step agent run is roughly 19 cents.
- Tool calling, JSON mode and streaming are supported, with a 100,000-token context window.

What this endpoint is, and what it is not
The query mentions DeepSeek, so a quick clarification. This service is not the official DeepSeek API and does not route to DeepSeek or any other vendor. It runs one open-weight model through an independent provider, tuned to answer without content refusals for lawful adult use. You call it as model uncensored at https://api.getdeepseekapi.com/v1, using the same request format as the OpenAI SDKs. If you came for DeepSeek's own models, use DeepSeek directly and check their docs.
Why use an unfiltered model for code at all? Most programming questions never trigger a refusal on any model. But some lawful tasks do get blocked or watered down by filters: writing a port scanner for your own network, analysing a suspicious binary sample, fuzzing your own API, building a scraper, explaining how an exploit class works so you can patch it. A model tuned to answer those directly saves the time you would spend rephrasing. It does not make the code better, and it does not remove your responsibility to use it lawfully. Hard limit: nothing involving sexual content with minors, ever.
Set up in two minutes
Create an account (Google, or email and password) and open the API key page. New users can claim $0.50 of trial credit with one click. It is valid for 7 days, needs no card and is one per person. Then install the SDK and run a first call.
pip install openai
export UNCENSORED_API_KEY="paste-your-key-here"
import os
from openai import OpenAI
client = OpenAI(
base_url="https://api.getdeepseekapi.com/v1",
api_key=os.environ["UNCENSORED_API_KEY"],
)
resp = client.chat.completions.create(
model="uncensored",
temperature=0.2,
messages=[
{"role": "system", "content": "You are a senior engineer. Answer with code first, then a short explanation."},
{"role": "user", "content": "Write a Python function that scans TCP ports 1-1024 on a host I own, using asyncio."},
],
)
print(resp.choices[0].message.content)
A low temperature, around 0.0 to 0.3, suits code. Set a higher one only when you want varied alternatives for brainstorming.
Code review on a whole file or small repo
A few prompting habits make code answers better on any model. Name the language and version, paste the exact error text instead of describing it, and say what you have already tried. Ask for a diff or a single function instead of a rewrite of the whole file, because short answers are cheaper and easier to review. When the task is large, split it: one request to plan, a second to write each part. That also keeps each prompt well inside the window and lets you run independent pieces in parallel, up to the concurrency limit.
The 100,000-token window (prompt plus completion) lets you paste a lot of source into one request. Roughly, 1,000 lines of typical code is 10,000 to 15,000 tokens, but measure with the usage field instead of trusting a rule.
JSON mode makes review output machine-readable. Ask for a fixed shape and parse it.
import json, pathlib
source = pathlib.Path("app.py").read_text()
r = client.chat.completions.create(
model="uncensored",
temperature=0.1,
response_format={"type": "json_object"},
messages=[
{"role": "system", "content": "Review code. Return JSON: {\"issues\": [{\"line\": int, \"severity\": \"low|medium|high\", \"problem\": str, \"fix\": str}]}"},
{"role": "user", "content": source},
],
)
for issue in json.loads(r.choices[0].message.content)["issues"]:
print(issue["severity"], issue["line"], issue["problem"])
print(r.usage)
JSON mode guarantees valid syntax, not your exact keys, so check that the fields exist before you use them. Costs are small. Sending a 50,000-token codebase and getting 2,000 tokens back costs 50,000 x 0.15 / 1,000,000 = $0.0075 for input plus 2,000 x 0.50 / 1,000,000 = $0.001 for output, a total of $0.0085.
Where refusals actually show up in coding work
It helps to be concrete, because a filtered model that refuses something harmless is not the same as one that refuses something dangerous. These are lawful tasks that developers report running into friction on elsewhere, so test them on whichever model you use:
- Security testing of systems you own or have written permission to test: scanners, fuzzers, proof-of-concept code to confirm a patch works.
- Reverse engineering and malware analysis: explaining what a decompiled routine does.
- Scraping and automation: handling logins, rate limits and anti-bot behaviour on your own accounts.
- Writing detection rules, which means understanding how the attack works first.
- Game modding and emulation tools that touch copy protection in unusual ways.
The responsibility does not move. If you use the output against systems you do not have permission to test, that is on you. The point of an unfiltered model is that it treats you as an adult who has a reason to ask, not that it makes any use acceptable.
Tool calling for a small coding agent
Tool calling lets the model request actions such as running tests. You define functions in tools, read tool_calls from the reply, run them yourself, and send results back with role: "tool". Here is a compact loop that can run a test command and read the output.
import json, subprocess
tools = [{
"type": "function",
"function": {
"name": "run_tests",
"description": "Run the project's test suite and return the output",
"parameters": {"type": "object", "properties": {}, "required": []},
},
}]
messages = [
{"role": "system", "content": "Fix failing tests. Call run_tests, then explain the cause."},
{"role": "user", "content": "The tests in this repo fail. Find out why."},
]
for step in range(6):
r = client.chat.completions.create(model="uncensored", messages=messages, tools=tools, temperature=0.2)
msg = r.choices[0].message
messages.append(msg)
if not msg.tool_calls:
print(msg.content)
break
for call in msg.tool_calls:
out = subprocess.run(["pytest", "-x", "-q"], capture_output=True, text=True, timeout=120)
messages.append({"role": "tool", "tool_call_id": call.id, "content": (out.stdout + out.stderr)[-4000:]})
Truncating the tool output to the last 4,000 characters keeps context, and cost, under control. Always put a hard cap on loop steps, and run shell commands only inside a sandbox or a directory you can afford to lose. For ready-made editor and terminal tools, many accept an OpenAI-compatible base URL; the integration docs list the supported parameters.
What an agent session costs
Agents are priced by repetition. Every step resends the context, so input tokens dominate. Rates are $0.15 per 1M input tokens and $0.50 per 1M output tokens.
Suppose a session runs 30 steps, each sending about 40,000 tokens of context and returning about 500 tokens.
- Input: 30 x 40,000 = 1,200,000 tokens, so 1.2 x $0.15 = $0.18
- Output: 30 x 500 = 15,000 tokens, so 0.015 x $0.50 = $0.0075
- Total: $0.1875
At that rate, $20 of credit covers more than 100 such sessions. Credit is prepaid, never expires and there is no subscription. Top up with any whole amount from $20 to $500 by crypto (USDT on TRC20, USDC on Base), with bonuses of +5% from $50, +10% from $100 and +15% from $200. Failed or refused requests are not charged. Details are on the pricing page.
Limits and honest caveats
A full key allows 8 concurrent requests and 300 per minute; a trial key allows 2 and 60. Running tests in parallel across many files? Cap your worker pool at 8. Over a limit, the API returns a 429: rate_limited for requests per minute and concurrency for too many at once. Temporary overload returns 429 with Retry-After: 5. A streamed request holds its slot until the stream ends, so close streams you no longer need.
Now the caveats. We do not publish benchmarks, and you should not assume this model beats any other on coding quality. It is a general open-weight model tuned for no refusals, not a specialised code model. Test it on a sample of your own tasks and compare with whatever you use now. It is text only and the body limit is 8 MB, so you cannot send large binaries. Prompts are not used for training, which matters when the code is private. If you want the broader context of this service, the DeepSeek alternative overview explains how it differs from vendor APIs.
More guides
Questions and answers
Is this the official DeepSeek API?
No. It is a separate service running one independent open-weight model, ID uncensored, behind an OpenAI-compatible API.
Does it support function calling for coding agents?
Yes. Use tools and tool_choice, handle tool_calls in the reply, and return results as role tool messages. Streamed tool calls work too.
How large a codebase can I send?
The window is 100,000 tokens for prompt plus completion, and the request body can be up to 8 MB. Check token usage in the response.
How much does a code review cost?
A 50,000-token input with 2,000 tokens of output costs $0.0085 at $0.15 and $0.50 per 1M tokens.
Your key is one form away
Create an account, copy the key, change the base URL. That is the whole setup.