EN ▾

Integration Guide for Developers

Drop this uncensored LLM into your existing OpenAI-compatible code with zero friction. We provide a single, robust model via standard endpoints so you can focus on building features instead of configuring routers.

Base URL and Authentication

Start by pointing your client to our base URL and supplying your API key in the authorization header. This works with any OpenAI-compatible SDK because we follow the standard protocol exactly. Generate your key instantly via Google or email on the Get API key page; no phone number is required. Keep your key secure and use one active key per account, as generating a new one replaces the old.

Authentication is simple. Send your key in the Authorization header for every request. Our system validates the key before processing tokens, ensuring only authorized accounts consume credit. Errors like a missing key return a 401 status immediately.

First Request

Send a standard chat completion request to test connectivity and response quality. This simple call verifies your key and credits your account correctly. The model id is uncensored, which handles text input and output without content refusals for lawful adult use. Replace the placeholder with your actual key and system prompt.

curl https://api.deepseekapicost.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 1 million tokens"}]
  }'

This curl command demonstrates the minimal structure required. You can adjust the messages array to include context or instructions. The response returns the generated text in the content field. Check the usage stats in the response headers to monitor your token consumption.

Python SDK

Use the official OpenAI Python library to integrate our API into your scripts or applications. Set the base_url and api_key attributes before making calls. This approach ensures compatibility with existing codebases that already use OpenAI models. You can switch between providers by changing just two lines of configuration.

from openai import OpenAI

client = OpenAI(base_url="https://api.deepseekapicost.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)

The Python snippet above shows how to initialize the client and send a request. The library handles JSON serialization and response parsing automatically. You can access the response object to extract content, usage statistics, and finish reasons. This method is ideal for backend services or data processing pipelines.

Node SDK

Integrate our API into Node.js applications using the openai npm package. Configure the client with our base URL and your API key just like you would for OpenAI. This allows you to use the same code structure for both testing and production. The SDK supports asynchronous operations for non-blocking requests.

import OpenAI from "openai";

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

This Node.js example demonstrates sending a chat completion request. The await keyword ensures the response is fully received before proceeding. You can handle errors using try-catch blocks to manage network issues or API limits gracefully. The response object contains the generated text and token usage details.

Streaming

Enable streaming to receive token-by-token responses for better user experience in chat interfaces. Set the stream parameter to true in your request. The API returns chunks of text as they are generated, allowing you to display output in real time. This reduces perceived latency for end-users significantly.

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)

The streaming code above processes each chunk as it arrives. You can append the content to a UI element immediately. The final chunk contains the total token usage statistics. This feature is supported by all OpenAI-compatible clients that handle SSE responses correctly.

Limits, Errors, and Context Window

Our API enforces strict limits to ensure fair usage and system stability. You are allowed 300 requests per minute and 8 concurrent requests per key. Each request body must not exceed 8 MB. If you exceed these limits, the API returns a 429 status code. Wait a few seconds and retry your request. Errors like invalid keys return 401, and insufficient credit returns 402.

The context window supports up to 100,000 tokens for both input and output combined. Max output per request is 16,000 tokens, or 2,048 if you do not specify max_tokens. This large window allows you to process long documents or maintain extensive conversation history without truncation. Errors and refusals do not consume credit, so you only pay for actual usage.

Frequently asked questions

How do I pay for usage?

We use a prepaid credit system topped up with crypto only (USDT on TRC20 or USDC on Base). You can top up any whole amount from $20 to $500, with bonus credit starting at $50. Credit never expires and errors are free.

Is this model uncensored?

Yes, the model is tuned to answer without content refusals for lawful adult use. It does not refuse controversial, fictional, or security-research topics. The only hard limit is no sexual content involving minors, which is always refused.

What happens if I run out of credit?

Requests will return a 402 status code indicating insufficient funds. You can top up instantly via crypto to resume service. Your existing API key remains valid, and you can continue using it once credit is added.

Claim your API key now

Sign up, grab your key, and update your base URL. It takes seconds.

Claim trial key