Get API key

API Quickstart Guide

This guide helps you integrate our uncensored, OpenAI-compatible API with your existing client code. You get a single model, transparent pricing, and no vendor lock-in.

https://api.pricingapideepseek.com/v1

Base URL and Authentication

Use our specific base URL and a valid API key for every request.

The base URL is https://api.pricingapideepseek.com/v1. Update your SDK configuration to point here instead of the default OpenAI endpoint. Authenticate by passing your API key in the Authorization header. You get one key per account. If you need a new one, the old key stops working immediately. Start with the $0.50 trial credit to verify connectivity before buying crypto.

Send Your First Chat Completion

Send a POST request to the chat completions endpoint to get a text response.

This is a drop-in replacement for standard OpenAI clients. You define the model ID as uncensored. The API returns text based on your prompt. Errors like missing credits or invalid keys return standard HTTP status codes. No extra configuration is needed for basic text generation.

  • Endpoint: POST /v1/chat/completions
  • Model ID: uncensored
  • Input: Text prompts only

Check your balance if you get a 402 error. Top up with USDT or USDC to continue using the service without interruption.

Python SDK Integration

Configure the OpenAI Python library to use our base URL and your key.

This allows you to use familiar Python code for your LLM interactions. The library handles the request formatting automatically. You just need to override the default API host. This ensures your existing scripts work without major refactoring.

  • Set base_url to our API endpoint.
  • Set api_key to your unique key.
  • Call chat.completions.create with model uncensored.

Errors are raised as standard exceptions. Check the error message for details on rate limits or billing issues.

Node SDK Configuration

Initialize the OpenAI Node client with our custom host and credentials.

This approach works well for server-side applications or Node.js environments. You pass the base URL and API key during initialization. The rest of the SDK functions identically to the standard version. You can send messages and receive text responses without changing your logic.

  • Import the OpenAI package.
  • Create a client instance with custom base URL.
  • Use the standard chat.completions.create method.

Ensure your key is valid. The API rejects requests with expired or incorrect keys. Monitor your usage to avoid unexpected charges.

Streaming Responses with SSE

Enable streaming to receive tokens as they are generated.

Set stream: true in your request. The API sends Server-Sent Events (SSE) for each token. This reduces perceived latency for end-users. You process chunks as they arrive. The final chunk contains the total token usage for billing. This is ideal for chat interfaces and real-time applications.

  • Set stream to true.
  • Handle SSE events in your code.
  • Display tokens progressively.

Streaming does not change the pricing. You pay for the total tokens used. Errors during streaming are sent in the final chunk. Check for error fields in that last event.

Limits, Errors, and Context Window

Understand your rate limits, error codes, and token constraints.

You can send 300 requests per minute. Only 8 requests run simultaneously per key. The request body must be under 8 MB. The context window is 100,000 tokens total. This includes both your prompt and the generated response. If you exceed the limit, you get a 429 error. Invalid keys return 401. No credit returns 402. Errors do not consume tokens. Refusals are also free. This ensures you only pay for actual output. Plan your token usage carefully to stay within the 16,000 token max output limit.

cURL

curl https://api.pricingapideepseek.com/v1/chat/completions \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "uncensored",
    "messages": [{"role": "user", "content": "List the per million token costs for input and output."}]
  }'

Python

from openai import OpenAI

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

Common questions

What is the context window size?

The context window is 100,000 tokens. This limit includes both the input prompt and the generated completion. You can generate up to 16,000 tokens per request.

How do I handle API errors?

Errors return standard HTTP status codes. A 401 means your key is invalid. A 402 indicates insufficient credit. A 429 signals that you have hit the rate limit. Errors do not consume your token balance.

Can I use this API for coding tasks?

Yes. The uncensored model handles code generation well. It does not refuse lawful technical queries. You can send code snippets and get responses in standard formats. JSON mode is available for structured data.

Get your API key

Sign up, copy your key, update the base URL. That is all you need.

Get API key