API Documentation for Developers
Get your uncensored API key and start sending requests immediately with our OpenAI-compatible endpoint. This guide covers the base URL, authentication, and SDK examples for developers who need reliable token-by-token billing.
uncensoredhttps://api.deepseektokenplan.com/v1
Base URL and Authentication
Start by changing the base URL to our dedicated endpoint and passing your API key in the Authorization header. We do not use the standard OpenAI base URL; you must point your SDK to https://api.deepseektokenplan.com/v1. This ensures your requests route through our uncensored model infrastructure instead of a third-party proxy. The model ID you specify in the request body is "uncensored", which triggers the specific tuned weights on our servers. Authentication relies on a simple Bearer token scheme that works with any OpenAI-compatible client library. Your key is generated instantly upon signup via Google or email, with no phone number required. Keep this key secure, as it links directly to your prepaid credit balance.
First Request
Send a standard chat completions request using cURL to verify your setup and model availability. This simple POST request demonstrates how the API accepts your system prompt and user message. You can adjust the temperature and top_p parameters to control creativity. The response returns the generated text along with token usage statistics for billing transparency. Ensure your request body includes the correct model identifier and your API key in the header. This method works for both text generation and function calling scenarios. Use this command to confirm connectivity before integrating into your application. The endpoint supports streaming and non-streaming modes equally well.
Python SDK Integration
Use the official OpenAI Python library to interact with our API by configuring the base URL and API key. Initialize the client with your credentials and call the chat completions method with your desired model ID. This approach allows you to leverage existing codebases that were built for OpenAI without major refactoring. You can stream responses or receive the full text at once. The library handles JSON serialization and HTTP requests automatically. Configure the timeout and retry settings as needed for your specific use case. This method is ideal for backend services and data processing pipelines. Ensure you update the base URL to point to our specific endpoint.
Node SDK Integration
Integrate the API into your JavaScript or TypeScript applications using the OpenAI Node package. Set the base URL and API key in the client configuration before making any requests. This setup allows you to use familiar methods like chat.completions.create() with our uncensored model. You can pass parameters like temperature and stop sequences to fine-tune the output. The SDK handles streaming responses efficiently for real-time applications. Use this approach for web servers or command-line tools. Ensure you import the necessary modules and configure the environment variables correctly. This method supports both synchronous and asynchronous request patterns.
Streaming and Tokens
Enable streaming to receive partial responses as they are generated, improving the user experience for chat interfaces. The API uses Server-Sent Events (SSE) to deliver tokens in real-time. You can track token usage in the final chunk of the stream for accurate billing. This feature is supported by all major SDKs and can be implemented manually if needed. Streaming reduces the perceived latency for long responses. Set the stream parameter to true in your request body. The API returns usage statistics in the last event, allowing you to deduct the correct amount from your prepaid credit. This method is essential for applications requiring immediate feedback.
Limits and Error Handling
Monitor your rate limits and handle errors gracefully to ensure a stable connection. The API allows 300 requests per minute per key and 8 concurrent requests. Each request body must not exceed 8 MB. If you send an invalid key, you will receive a 401 Unauthorized error. A 402 error indicates insufficient prepaid credit, requiring you to top up via crypto. A 429 error means you have exceeded the rate limit; wait and retry. The context window is 100,000 tokens for prompt and completion combined. Max output is 16,000 tokens unless you specify a lower max_tokens value. Always check the status code and response body for detailed error messages.
cURL
curl https://api.deepseektokenplan.com/v1/chat/completions \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "uncensored",
"messages": [{"role": "user", "content": "Calculate total monthly cost for 50 million tokens"}]
}'Python
from openai import OpenAI
client = OpenAI(base_url="https://api.deepseektokenplan.com/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.deepseektokenplan.com/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)Frequently asked questions
What is the deepseek token plan for uncensored API?
It is a prepaid credit system where you pay only for the tokens you use, with no monthly subscriptions. Errors and refusals are free, and credit never expires. You can top up using USDT or USDC with bonus credits for larger amounts.
How do I get an API key?
Sign up using Google or email on the Get API key page. Your key is generated instantly and shown immediately, with no phone number required. You can replace your key if needed, but only one active key is allowed per account.
What are the limits for requests?
You can make 300 requests per minute and 8 concurrent requests per key. The request body must not exceed 8 MB. The context window supports 100,000 tokens, with a maximum output of 16,000 tokens per request.
Get your API key
Sign up, copy your key, update the base URL. That is the entire setup.