Switch your client in three lines
Connect to our uncensored API in under five minutes using standard OpenAI-compatible libraries. No credit card required to start, just grab your key and send your first request.
Base URL and Authentication
Our service is a drop-in replacement for standard OpenAI endpoints. To authenticate, you need an API key, which you generate instantly on the Get API key page using Google or email. There is no phone number verification or credit card required for the initial trial credit of $0.50.
Configure your client to point to our base URL. Every request must include the Authorization: Bearer header with your unique key. This ensures your prompts are routed to our uncensored model without hitting external safety filters.
The base URL is: https://api.deepseeknsfw.top/v1. All standard OpenAI SDKs support this configuration via a simple base_url override. You can verify your connection by listing available models.
First Request
Send your first completion request using the /v1/chat/completions endpoint. This endpoint accepts standard chat format messages. The model ID to use is uncensored. This model is an open-weight large language model tuned for adult content and does not refuse lawful topics.
Below is a minimal cURL example to test connectivity and receive a text response. Ensure you replace YOUR_API_KEY with the key generated from your account dashboard.
If you receive a valid JSON response, your integration is working. If you see a 401 error, check that your key is correct. A 402 error indicates your prepaid credit has been exhausted.
Python SDK Integration
Using the official openai Python package makes integration trivial. Initialize the client with our base URL and your API key. You can then call chat.completions.create just as you would for GPT-4.
This approach works for any language that supports the OpenAI protocol. The model will return text output based on your prompt. Since we do not offer embeddings or image generation, stick to text completion tasks. The code below demonstrates a basic synchronous request.
Remember that our model ID is fixed at uncensored. You do not need to select a version; the API serves the latest uncensored weights by default.
Node.js SDK Setup
For JavaScript developers, the openai Node.js package works identically. Set the baseURL to our endpoint and provide your key in the apiKey field. This allows you to use the same client code you might have used for other providers, simply by changing the configuration.
Create a completion object with a system prompt and user message. The response will be available in response.choices[0].message.content. This method is reliable for generating long-form adult content or creative writing without refusal.
The code sample below shows how to instantiate the client and send a request. Ensure your environment supports the required Node.js version for the SDK you are using.
Streaming Responses
For better user experience, enable streaming by setting stream: true in your request. The API returns a Server-Sent Events (SSE) stream. Each chunk contains partial text and token usage information.
Streaming is ideal for chat interfaces where you want to display tokens as they are generated. The final chunk in the stream contains the total token usage for the request. This helps you track costs accurately, as we charge $0.25 per 1M input tokens and $1.00 per 1M output tokens.
Handle stream errors gracefully. If the connection drops, you may lose partial tokens. Our API ensures that completed tokens are billed correctly even if the stream ends unexpectedly.
Limits, Errors, and Context
Our API has strict limits to ensure stability. You are allowed 300 requests per minute per key and 8 concurrent requests. The maximum request body size is 8 MB. If you exceed the rate limit, you will receive a 429 error. Increase your wait time or reduce concurrency.
The context window is 100,000 tokens total (prompt + completion). The maximum output per request is 32,000 tokens, or 2,048 if you do not specify max_tokens. Errors and refusals are free, so you can test without draining your credit.
Common errors include 401 (invalid key), 402 (insufficient credit), and 429 (rate limit). Refunds are not available for credit, but mistakes like double charges are fixed via the Support page. Keep your key secure; only one key is active per account.
cURL
curl https://api.deepseeknsfw.top/v1/chat/completions \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "uncensored",
"messages": [{"role": "user", "content": "Write a blunt product review of a cheap VPN."}]
}'Python
from openai import OpenAI
client = OpenAI(base_url="https://api.deepseeknsfw.top/v1", api_key="YOUR_KEY")
resp = client.chat.completions.create(
model="uncensored",
messages=[{"role": "user", "content": "Summarise this thread without softening it."}],
)
print(resp.choices[0].message.content)Node.js
import OpenAI from "openai";
const client = new OpenAI({ baseURL: "https://api.deepseeknsfw.top/v1", apiKey: process.env.API_KEY });
const resp = await client.chat.completions.create({
model: "uncensored",
messages: [{ role: "user", content: "Draft a villain monologue for my game." }],
});
console.log(resp.choices[0].message.content);Streaming
stream = client.chat.completions.create(
model="uncensored",
messages=[{"role": "user", "content": "Tell the story in second person."}],
stream=True,
)
for chunk in stream:
if chunk.choices and chunk.choices[0].delta.content:
print(chunk.choices[0].delta.content, end="", flush=True)API specifications
Use this table to decide whether the API fits your project before you buy credit.
| Spec | Value |
|---|---|
| API format | OpenAI-compatible: any OpenAI SDK or client works — change the base URL and the key |
| Methods | POST /v1/chat/completions · GET /v1/models |
| API key | Bearer token in the Authorization header |
| Model | uncensored |
| Base URL | https://api.deepseeknsfw.top/v1 |
| Context window | 100,000 tokens, input and output combined |
| Max output | prompt + completion fit within 100,000 tokens; max_tokens optional, no separate output cap |
| Streaming | Yes — server-sent events; the last chunk carries token usage |
| JSON mode | response_format: {"type": "json_object"} |
| Other parameters | temperature, top_p, stop, seed, presence_penalty, frequency_penalty |
| Tools / tool calls | Yes — tools, tool_choice; replies carry tool_calls, also when streaming; send results back as role: tool |
| Request size | 8 MB request body |
| Headers | X-Request-Id, X-Balance-USD, X-RateLimit-Limit-Requests, X-RateLimit-Limit-Concurrency |
| Parallel requests | up to 8 in parallel per key |
| Rate limit | 300 requests per minute per key |
| Top-up | crypto: USDT on TRON or USDC on Base, $10–$500, any whole sum |
| Price | $0.25 per 1M input tokens · $1.00 per 1M output tokens |
| Volume bonus | +5% on $50+, +10% on $100+ |
| Billing | prepaid credit, charged by real token usage; errors and refusals are free |
| Subscription | paid credit never expires, no subscription |
| Free trial | $0.50 for 7 days, no card · Trial key: 2 parallel requests, 60 req/min; full limits (8 and 300) after first top-up |
| Sign-in | sign in with Google or with e-mail + password |
| Content | uncensored for adults; the only hard rule: no sexual content involving minors |
| Keys | one active key per account; a new key replaces the old one |
Error codes
Every error is JSON with a type you can switch on. You are never charged for an error.
| HTTP | Type | What to do |
|---|---|---|
400 | bad_request | invalid JSON, empty messages, bad parameter, or prompt + max_tokens over the window — fix and resend |
401 | missing_key · invalid_key · key_revoked | no key, wrong key, or a key replaced by a newer one |
402 | no_credit | out of credit; add credit and retry |
403 | content_blocked | sexual content involving minors — refused, not billed |
404 | not_found | unknown endpoint |
413 | request_too_large | request body larger than 8 MB |
429 | rate_limited · concurrency | slow down: rate or parallel limit reached |
503 | upstream_busy | temporary overload, retry shortly |
Questions and answers
What is the context window size?
The total context window is 100,000 tokens, combining both the prompt and the completion. If you do not set a max_tokens limit, the maximum output is capped at 2,048 tokens per request.
How do I top up my credit?
Top-ups are processed via cryptocurrency only, specifically USDT (TRC20) or USDC (Base). You can deposit any whole amount between $10 and $500. Credits never expire and a bonus is applied for larger deposits.
Is this the official DeepSeek API?
No. We are an independent service hosting an uncensored model. We are not affiliated with DeepSeek, OpenAI, or any other vendor. Our API is compatible with their client code but serves our own model.
Your key is one form away
Create an account, copy the key, change the base URL. That is the whole setup.