API Quickstart
This quickstart guide shows you how to send requests to our uncensored, OpenAI-compatible API using standard SDKs. You will configure your base URL, handle authentication, and stream responses without vendor lock-in.
Base URL and authentication
The deepseek api documentation for this service starts with the base URL https://api.deepseekcoderpricing.com/v1. You need a valid API key sent in the Authorization header for every request. Get your API key immediately after signing up with Google or email.
Authentication is simple. Include the header Authorization: Bearer YOUR_API_KEY in all calls. If the key is missing or invalid, the server returns a 401 error. This ensures your uncensored LLM API access remains secure without complex setup steps.
First request
Your first request confirms connectivity and token billing. The endpoint is POST /v1/chat/completions. You must set the model ID to uncensored. This model runs on our own servers and does not refuse lawful adult content.
Send a basic prompt to verify the connection works correctly. The system charges only for tokens actually used in the response. Errors and refusals do not consume your prepaid credit.
The base URL is https://api.deepseekcoderpricing.com/v1.
curl https://api.deepseekcoderpricing.com/v1/chat/completions \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "uncensored",
"messages": [{"role": "user", "content": "List the hourly compute cost for the 7b model."}]
}'
Python SDK integration
Using the standard OpenAI Python SDK is the easiest way to integrate. Set the base_url and api_key variables before initializing the client. This allows you to reuse existing code snippets from other platforms with minimal changes.
The client handles JSON serialization automatically. You pass messages as a list of dictionaries. The response object contains the generated text and token usage statistics for billing transparency.
from openai import OpenAI
client = OpenAI(base_url="https://api.deepseekcoderpricing.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.deepseekcoderpricing.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)