EN ▾
Get API key

Quickstart for DeepSeek users

Drop your OpenAI-compatible client into our uncensored DeepSeek API in three lines: update the base URL, swap the API key, and keep your code. This guide shows exactly how to connect using standard SDKs without model refusals.

Base URL and Authentication

To use our API, point your client to https://api.deepseekapi.top/v1. You do not need to change the endpoint paths; the standard /v1/chat/completions works exactly as expected. Authentication relies on a single API key generated during signup. Pass this key in the Authorization header as a Bearer token. If the key is missing or invalid, the server returns a 401 error. Ensure your environment variables are set correctly before making your first request.

  • Base URL: https://api.deepseekapi.top/v1
  • Auth Header: Authorization: Bearer YOUR_API_KEY
curl https://api.deepseekapi.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."}]
  }'

Chat Completions Endpoint

Our API accepts standard chat completion requests. Send a POST request to /v1/chat/completions with a model ID of uncensored. The model responds to text input and generates text output without applying the content filters typical of official DeepSeek or other major providers. This makes it ideal for creative writing, roleplay, or unrestricted data processing. You can control behavior using parameters like temperature and top_p. The response includes the generated text and token usage statistics.

Remember that the model is not GPT, Claude, or any other vendor's model. It is an independent open-weight model tuned for unrestricted lawful use. Check the pricing page for token costs.

from openai import OpenAI

client = OpenAI(base_url="https://api.deepseekapi.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 SDK Integration

For Node.js developers, the process is identical to standard OpenAI integrations. Initialize the client with your specific base URL and API key. Set the model to uncensored in your configuration. The SDK handles the request lifecycle, including retries and error handling, just like it would for any OpenAI-compatible service. This allows you to reuse existing codebases with minimal friction. Ensure you are using a recent version of the openai npm package for full compatibility.

The API supports both synchronous and asynchronous calls. You can pass messages in the standard messages array format. The response structure matches the OpenAI API specification, making migration straightforward.

import OpenAI from "openai";

const client = new OpenAI({ baseURL: "https://api.deepseekapi.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 Responses

Enable streaming by setting stream: true in your request. The API returns a Server-Sent Events (SSE) stream. Each chunk contains a partial response, allowing you to display text as it is generated. Token usage data is included only in the final chunk of the stream, not in every chunk. This design reduces payload size while still providing accurate billing metrics. You do not need to configure special stream_options to get usage data; it is provided automatically at the end.

Handle the stream events to update your UI in real time. The stream ends when the model completes its response or hits a limit.

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)

Function Calling and JSON Mode

The API supports function calling via the tools and tool_choice parameters. Define your functions in the request, and the model will return structured tool calls. You can also enforce strict JSON output by setting response_format to {"type": "json_object"}. This is useful for generating structured data without parsing errors. The model is tuned to follow these instructions reliably.

Combine function calling with streaming for dynamic interactions. The API maintains context across multiple turns, allowing for complex multi-step workflows. Ensure your function definitions are clear and well-structured for best results.

Limits, Errors, and Context Window

Your context window is 100,000 tokens, combining prompt and completion. Max output is 32,000 tokens per request, or 2,048 if you do not set max_tokens. Rate limits are 300 requests per minute and 8 concurrent requests per key. If you exceed these, you receive a 429 error. A 401 error indicates an invalid key, while a 402 error means your prepaid credit is exhausted. Errors and refusals consume no tokens. Requests are limited to an 8 MB body. Sign up with Google or email to get your key immediately.

Questions and answers

Is this the official DeepSeek API?

No. We are an independent provider running our own uncensored model via an OpenAI-compatible interface. It is not GPT, Claude, or the official DeepSeek service.

How do I handle errors like 402 or 429?

A 402 error means your prepaid credit is used up; top up by card (Visa, Mastercard, Apple Pay, Google Pay) or crypto (USDT on TRC20, USDC on Base). A 429 error indicates you have hit the rate limit of 300 requests per minute. Wait and retry, or upgrade your usage pattern.

Does the trial credit expire?

Yes. New accounts receive $0.50 in trial credit valid for 7 days. Prepaid credits never expire, but trial credits do.

Your key is one form away

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

Get API key

Specs at a glance

A quick checklist for developers: format, limits, features, billing.

ParameterDetails
API formatOpenAI Chat Completions schema; official openai SDKs work unchanged
Base URLhttps://api.deepseekapi.top/v1
Model IDuncensored
MethodsPOST /v1/chat/completions · GET /v1/models
AuthenticationAuthorization: Bearer YOUR_KEY
JSON modeJSON object mode via response_format json_object
Sampling parameterstemperature, top_p, stop, seed and the two penalties are passed through
Function callingYes — tools, tool_choice; replies carry tool_calls, also when streaming; send results back as role: tool
Completion lengthup to the rest of the 100,000-token window; max_tokens optional (no separate cap)
Context window100,000 tokens (prompt + completion together)
SSE streamingYes — server-sent events; the last chunk carries token usage
Concurrency8 requests at the same time per key
Requests per minute300 requests per minute per key
HeadersX-Request-Id, X-Balance-USD, X-RateLimit-Limit-Requests, X-RateLimit-Limit-Concurrency
Max bodyup to 8 MB per request
Token pricesinput $0.15 / 1M tokens, output $0.50 / 1M tokens
Billingpay as you go from prepaid credit; nothing is charged for failed or refused requests
Credit expirypaid credit never expires, no subscription
Free trial$0.50 of credit valid 7 days, no card needed · Trial key: 2 parallel requests, 60 req/min; full limits (8 and 300) after first top-up
Top-upcrypto: USDT on TRON or USDC on Base, $20–$500, any whole sum
Volume bonus+5% on $50+, +10% on $100+, +15% on $200+
Sign-inGoogle or e-mail and password
Content policyadult content allowed; sexual content involving minors is refused
Keysone active key per account; a new key replaces the old one

When a request fails

Every error is JSON with a type you can switch on. You are never charged for an error.

CodeTypeMeaning
400bad_requestmalformed request or too long for the context window
401missing_key · invalid_key · key_revokedno key, wrong key, or a key replaced by a newer one
402no_creditbalance is empty — top up, requests resume at once
403content_blockedsexual content involving minors — refused, not billed
404not_foundunknown endpoint
413request_too_largerequest body larger than 8 MB
429rate_limited · concurrencyslow down: rate or parallel limit reached
503upstream_busymodel busy — retry in a few seconds