tr ▾
Base URL https://api.sanscensure.com/v1Model uncensored
Start now
Sans CensureIntegration Guide: OpenAI-Compatible Endpoints

Integration Guide: OpenAI-Compatible Endpoints

Integrate our uncensored LLM into your stack using standard OpenAI endpoints. You get a single model, no routing, and zero corporate guardrails via a prepaid crypto wallet.

per 1M input tokens
$0.15
Output tokens / 1M
$0.50
token context
100,000
trial credit
$0.50
requests per minute
300

Base URL and Authentication

Start requests to https://api.sanscensure.com/v1 with your API key in the Authorization header. We use standard bearer token authentication, so existing OpenAI SDK clients work out of the box by simply updating the base URL. Generate your key instantly via Google or email on the dashboard, then copy it to your environment variables. There is no need for phone verification or complex setup steps.

Our architecture strips away the noise. You send a key, we validate it, and we route your prompt to our dedicated uncensored model. No embeddings. No routing logic. Just direct access to raw text generation. Keep your key secure, as it grants immediate access to your prepaid credit.

Chat Completions Endpoint

Send your prompts to POST /v1/chat/completions using the uncensored model ID. This endpoint handles all text generation tasks, from simple Q&A to complex roleplay scenarios. You define the conversation history in the messages array, and the API returns the next logical response. It is the core of our service, designed for developers who need reliability without content filters.

The model supports a 100,000-token context window, allowing for deep memory in long conversations. You pay only for tokens consumed, with input at $0.15 per million and output at $0.50 per million. Errors do not cost you credit, ensuring you only pay for actual results.

Streaming Responses via SSE

Enable real-time text delivery by setting stream: true in your request body. The API returns Server-Sent Events (SSE), pushing tokens to your client as they are generated. This creates a smooth, chat-like experience for end-users, reducing perceived latency significantly. You receive partial chunks until the final token arrives.

Stream responses are essential for interactive applications. They allow your interface to display text incrementally while the model computes the rest. Our SSE implementation includes token usage metrics in the final chunk, so you can track costs accurately. This feature works seamlessly with any standard SSE client library.

Function Calling and Tools

Define custom tools in your request to enable the model to invoke external functions. Pass a tools array with function definitions, and set tool_choice to auto or specific tool names. The model will return structured JSON arguments when it decides a tool is necessary. This allows you to connect the LLM to your own database, calculators, or APIs.

Function calling works exactly like the OpenAI standard. You provide the schema, the model decides when to use it, and you execute the function. This flexibility makes our API suitable for complex agent workflows. You can chain multiple tool calls within a single conversation turn, enabling sophisticated multi-step reasoning tasks.

JSON Mode for Structured Output

Force the model to output strictly valid JSON by setting response_format to {"type": "json_object"}. This is crucial for parsing data in automated pipelines or building structured interfaces. The model is tuned to adhere to this format, reducing the need for post-processing regex fixes. It ensures your downstream code receives predictable, parseable text every time.

Structured output is vital for reliability. When you need specific fields or data types, JSON mode guarantees compliance. Combine this with function calling for maximum control. You can extract entities, generate config files, or build dynamic UI components directly from the model's response. It eliminates the guesswork in data extraction tasks.

Parameters: Temperature, Top P, and Seeds

Control creativity with temperature (0.1 to 2.0) and diversity with top_p. Lower temperatures yield deterministic, precise answers, while higher values encourage varied, creative outputs. Use seed for reproducible results during testing. These parameters allow fine-tuning of the model's behavior to match your specific use case, whether it is coding, writing, or analysis.

Adjusting these settings changes how the model predicts the next token. presence_penalty and frequency_penalty help reduce repetition. Fine-tune these values to get the exact tone and style you need. Our model responds well to these standard parameters, giving you full control over the output quality without needing custom wrappers.

cURL

curl https://api.sanscensure.com/v1/chat/completions \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "uncensored",
    "messages": [{"role": "user", "content": "Fix the null pointer in the async handler"}]
  }'

Python

from openai import OpenAI

client = OpenAI(base_url="https://api.sanscensure.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.sanscensure.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 sans censure API context limit?

The API supports a 100,000-token context window for both prompt and completion combined. Max output per request is 16,000 tokens, or 2,048 if you do not specify <code>max_tokens</code>. This allows for extensive conversation history or large document processing without losing context.

How do I handle rate limits and errors?

You are limited to 300 requests per minute and 8 concurrent requests per key. A 429 error indicates you have hit this limit. Use a 401 error to check for invalid keys, and a 402 error if your prepaid credit is exhausted. Errors do not consume tokens, so you are not charged for failed attempts.

Is this API compatible with OpenAI SDKs?

Yes, it uses the standard OpenAI-compatible interface. You can use the official OpenAI Python or Node SDKs by simply changing the base URL to our endpoint. The model ID is <code>uncensored</code>, and all standard parameters like temperature and stream are supported. It works with any client that speaks the OpenAI protocol.

Access in two steps

Register, retrieve your key, update the endpoint URL. That is the entire configuration.