EN ▾

API Documentation

Connect your existing client code to our uncensored LLM in minutes. This quickstart guide covers the OpenAI-compatible endpoints, streaming, and authentication needed to start using our API.

Base URL and Authentication

Our API base URL is HTTPS://api.deepseekpricingapi.com/v1. You authenticate by passing your API key in the Authorization header. Generate your key instantly via the Get API key page using Google or email. The key is unique to your account and replaces any previous key upon regeneration.

First Request

Send a standard chat completion request to test connectivity. Use the model ID uncensored to access our uncensored LLM. The response returns generated text based on your prompt.

curl https://api.deepseekpricingapi.com/v1/chat/completions \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "uncensored",
    "messages": [{"role": "user", "content": "Fix syntax error in this python script"}]
  }'

If you receive a 401 error, verify your key. A 402 error indicates insufficient prepaid credit. A 429 error means you have exceeded the 300 requests per minute limit.

Python SDK Integration

Use the official OpenAI Python library for immediate compatibility. Set the base URL to our endpoint and provide your API key. This allows you to reuse existing client code without vendor lock-in.

from openai import OpenAI

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

Ensure your library version supports the parameters listed in our documentation. The client handles the underlying HTTP requests efficiently.

Node SDK Integration

Install the OpenAI Node.js package and configure the base URL. Pass your API key in the configuration object. This method works identically to the Python implementation.

import OpenAI from "openai";

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

Handle the response asynchronously to manage your application flow. The model ID remains uncensored for all completions.

Streaming and Parameters

Enable streaming by setting stream: true in your request. You receive chunks of text as they are generated, with token usage details in the final chunk. Supported parameters include temperature, top_p, stop, seed, presence_penalty, and frequency_penalty.

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)

Streaming reduces perceived latency for long responses. You can adjust temperature to control randomness in the output.

Limits and Context Window

The context window supports up to 100,000 tokens for the combined prompt and completion. The maximum output per request is 16,000 tokens, or 2,048 if max_tokens is unset. You are limited to 8 concurrent requests per key. Request bodies must not exceed 8 MB. Errors and refusals do not consume credit.

Common questions

What is the context window limit?

The API supports a context window of 100,000 tokens for the total prompt and completion. Maximum output is 16,000 tokens per request.

How do I handle errors?

A 401 error indicates an invalid API key. A 402 error means your prepaid credit is exhausted. A 429 error signals that you have exceeded the 300 requests per minute limit.

Does the uncensored API key work with standard OpenAI clients?

Yes, the API is fully OpenAI-compatible. You only need to update the base URL and API key in your existing client configuration.

Get your key in seconds

Sign up, retrieve your key, update your base URL. Done.

Claim trial key