Prerequisites: Install the OpenAI SDK
Install the official SDK for your preferred language to handle authentication and request formatting automatically. Our endpoint adheres to the standard OpenAI protocol, so you only need the client library. For Python, run pip install openai. Node.js users should execute npm install openai. These libraries manage the HTTP transport and JSON serialization for you.
from openai import OpenAI
client = OpenAI(base_url="https://api.isdeepseekuncensored.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)
Configuration: Set your base URL and API key
Point your SDK client to our specific base URL to access the uncensored model endpoint. You must set the base_url to https://api.isdeepseekuncensored.com/v1 and provide your API key from the dashboard. This configuration ensures your requests route correctly to our servers without modifying the rest of your code structure.
import OpenAI from "openai";
const client = new OpenAI({ baseURL: "https://api.isdeepseekuncensored.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);
Basic Completion: Send your first prompt
Send a POST request to /v1/chat/completions with the model ID set to uncensored. The system accepts standard parameters like temperature and top_p to control randomness. Use curl to verify connectivity and response format before integrating into your application logic.
curl https://api.isdeepseekuncensored.com/v1/chat/completions \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "uncensored",
"messages": [{"role": "user", "content": "List the dependencies for my Go project"}]
}'
Streaming Responses: Handle SSE for real-time output
Enable streaming by setting stream: true to receive tokens via Server-Sent Events (SSE). This approach reduces perceived latency for long outputs and allows you to display text as it generates. Each chunk contains partial content, with token usage details provided in the final chunk.
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)
Advanced Features: Function calling and JSON mode
Leverage structured outputs by using response_format for JSON mode or define tools for function calling. This enables reliable data extraction and integration with external systems. Set tool_choice to enforce specific behaviors or let the model decide based on the prompt context.
Rate Limits: Manage concurrency and requests per minute
Respect the limit of 300 requests per minute per key and a maximum of 8 concurrent requests. Your context window supports 100,000 tokens for both prompt and completion combined, with a hard output limit of 16,000 tokens per request. Handle 429 errors gracefully by implementing exponential backoff.