Deep Seek API Quickstart Guide
Stop fighting subscription locks and content filters. This guide shows you how to integrate our uncensored LLM into your stack using standard OpenAI-compatible tools.
Authentication & Base URL
Start by setting your API key and base URL immediately. Your key appears on screen after signup with Google or email. Use https://api.apiseekdeep.com/v1 as your base endpoint. Pass the key in the Authorization: Bearer header. This works with any OpenAI SDK or compatible client.
curl https://api.apiseekdeep.com/v1/chat/completions \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "uncensored",
"messages": [{"role": "user", "content": "Return the total row count for the user_logs table"}]
}'Your requests authenticate against our servers directly. No intermediate routing layers exist. Your key grants access to the uncensored model only.
Chat Completions Endpoint
Send messages to POST /v1/chat/completions for text generation. Use model ID uncensored for unrestricted outputs. Input text goes into the messages array. The API returns generated text in the response content field. This follows the standard OpenAI chat format exactly.
from openai import OpenAI
client = OpenAI(base_url="https://api.apiseekdeep.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)Keep your prompts structured. The model handles context well within limits. You get raw text output without extra formatting layers. Errors return standard HTTP codes.
Streaming Responses (SSE)
Enable streaming by setting stream: true in your request. You receive Server-Sent Events (SSE) as tokens generate. This reduces perceived latency for long outputs. Token usage details appear in the final chunk. You can stop generation early if needed.
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)Handle partial responses gracefully. Buffer tokens until completion. This method saves waiting time for large context windows. It works reliably with our 100,000 token context limit.
Function Calling & Tools
Define tools in your request body for structured outputs. The model can call functions based on your schema. Pass tool definitions in the tools array. Use tool_choice to force or allow automatic selection. This enables complex workflows without parsing raw text.
import OpenAI from "openai";
const client = new OpenAI({ baseURL: "https://api.apiseekdeep.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);Structure your JSON schemas carefully. The model respects tool constraints. You handle the function execution logic separately. This keeps your code clean and modular.
JSON Mode Configuration
Force strict JSON output using response_format: {"type": "json_object"}. The model returns only valid JSON structures. Use this for data extraction or structured data pipelines. Disable markdown formatting for cleaner parsing. This ensures reliable programmatic consumption of results.
curl https://api.apiseekdeep.com/v1/chat/completions \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "uncensored",
"messages": [{"role": "user", "content": "Return the total row count for the user_logs table"}]
}'Validate the output before processing. Strict mode reduces hallucination in fields. Combine this with tool definitions for maximum reliability. Your downstream apps will parse data faster.
Parameters: Temperature, Top P, Seed
Control creativity with temperature and top_p. Higher values increase randomness. Lower values make outputs deterministic. Use seed for reproducible results during debugging. Set max_tokens to limit output length. Default is 2,048 tokens if unset.
from openai import OpenAI
client = OpenAI(base_url="https://api.apiseekdeep.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)Adjust parameters for your use case. Roleplay benefits from higher temperature. Data tasks need lower values. Your prepaid credit charges based on actual tokens used. Errors do not cost credits.
Frequently asked questions
Does the deep seek API key work with official SDKs?
Yes. Our base URL and response format match the OpenAI specification exactly. You can use the official OpenAI Python, Node, or Go SDKs by simply changing the base URL and API key. No custom wrappers are needed.
What happens if I hit a rate limit?
You will receive a 429 Too Many Requests error. Our limit is 300 requests per minute per key. You can run 8 concurrent requests simultaneously. Wait a few seconds and retry. Your prepaid credit remains untouched during rate limit errors.
How does the context window work?
You get a 100,000 token context window for both input and output combined. The maximum output per request is 16,000 tokens. If you do not specify max_tokens, the default is 2,048 tokens. This allows for deep conversation history or large document processing.