First request in five minutes
Get an uncensored model running in under five minutes with our OpenAI-compatible API. This guide covers authentication, basic requests, streaming, and structured output using standard SDKs.
https://api.mistraluncensored.cc/v1uncensored
Prerequisites and Setup
To start, you need an API key. Sign up on the Get API key page using Google or email. The key appears immediately and is the only credential you need—no phone number or credit card required for the account. For your first trial, you receive $0.50 in credit valid for 7 days. Claim this credit with one click on your API key page. If you need more, top up by crypto (USDT on TRC20, USDC on Base). Our API key is the primary way to authenticate; each account holds one active key at a time.
The base URL for all requests is https://api.mistraluncensored.cc/v1. This endpoint is compatible with the official OpenAI SDKs and any client that supports the OpenAI chat-completions format. We serve a single uncensored model identified by the string uncensored. This is an open-weight model running on our servers, distinct from GPT, Claude, or other vendor offerings. It does not refuse lawful adult, fictional, or controversial topics, though it blocks sexual content involving minors.
Authentication with API Key
Every request to our API must include your API key in the Authorization header. The format is a Bearer token: Authorization: Bearer YOUR_API_KEY. If the key is invalid or expired, the API returns a 401 error. If your prepaid credit is exhausted, you receive a 402 error indicating you need to top up by crypto (USDT on TRC20, USDC on Base). There are no subscriptions or monthly fees; you simply pay for the tokens you consume. Errors and refusals do not charge your credit.
Keep your API key secure. Since only one key is active per account, generating a new key revokes the previous one. This ensures that if a key is compromised, you can immediately invalidate it by creating a new one on the dashboard.
Basic Chat Completion Request
A basic request sends a prompt and receives a text response. You specify the model as uncensored and provide a message history. The API returns generated text based on your input. This is a straightforward text-in, text-out interface. You can adjust parameters like temperature for creativity or top_p for diversity. The context window supports up to 100,000 tokens for prompt and completion combined, and there is no separate output cap.
- Input: System prompt, user prompt, optional assistant history.
- Output: Generated text, token usage stats, finish reason.
Use this structure for simple Q&A or content generation tasks.
Streaming Responses (SSE)
For real-time text generation, enable streaming by setting stream: true. The API returns a Server-Sent Events (SSE) stream. Each chunk contains a portion of the generated text. Token usage statistics are included in the final chunk. This is ideal for user interfaces that display text as it is generated, reducing perceived latency. Streaming works with all standard parameters and function calling modes.
Handle the stream in your client code to accumulate the final response. The last chunk will indicate the finish reason, such as stop or length. This approach provides a smoother user experience compared to waiting for the full response.
Function Calling and Tools
Our API supports function calling, allowing the model to output structured data for external tools. Define your tools with names, descriptions, and parameter schemas. Set tool_choice to auto or a specific tool name. The model may return a list of tool calls in the response. You then execute these tools and send the results back to the API in a new message to get a final answer. This enables complex workflows like data extraction or automated actions without leaving the chat context.
Ensure your tool definitions are clear and precise. The model will attempt to match the input data to the provided schemas. If no tool is needed, it returns a standard text response.
JSON Mode for Structured Output
To force the model to output valid JSON, set response_format to {"type": "json_object"}. This mode reduces the likelihood of malformed JSON, making it easier to parse the response in your application. Use this when you need structured data like lists, objects, or configuration settings. The model still follows its uncensored behavior but formats the output strictly as JSON.
This is useful for extracting data from text or generating configuration files. Note that strict JSON mode may slightly reduce creative flexibility compared to free-form generation. Use it when structure is more important than narrative flow.
Parameters: Temperature, Top-P, and Stop
Temperature controls randomness. Higher values (e.g., 0.8) make output more creative; lower values (e.g., 0.2) make it more deterministic. Top-p filters tokens based on cumulative probability. A value of 0.9 keeps the most likely 90% of tokens. Stop sequences halt generation when specific text is encountered. These parameters allow fine-tuning of the model's behavior for different use cases, from coding to creative writing. Experiment with combinations to find the optimal balance for your application.
cURL
curl https://api.mistraluncensored.cc/v1/chat/completions \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "uncensored",
"messages": [{"role": "user", "content": "Write a blunt product review of a cheap VPN."}]
}'Python
from openai import OpenAI
client = OpenAI(base_url="https://api.mistraluncensored.cc/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.mistraluncensored.cc/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)Under the hood: specs
Use this table to decide whether the API fits your project before you buy credit.
| Feature | Support |
|---|---|
| Protocol | OpenAI Chat Completions schema; official openai SDKs work unchanged |
| Endpoints | POST /v1/chat/completions · GET /v1/models |
| Base URL | https://api.mistraluncensored.cc/v1 |
| API key | Authorization: Bearer YOUR_KEY |
| Model | uncensored |
| Structured output | JSON object mode via response_format json_object |
| Max output | prompt + completion fit within 100,000 tokens; max_tokens optional, no separate output cap |
| Sampling parameters | temperature, top_p, stop, seed, presence_penalty, frequency_penalty |
| Max context | 100,000 tokens, input and output combined |
| Streaming | Yes — server-sent events; the last chunk carries token usage |
| Tools / tool calls | Yes — tools, tool_choice; replies carry tool_calls, also when streaming; send results back as role: tool |
| Max body | up to 8 MB per request |
| Response headers | X-Request-Id, X-Balance-USD, X-RateLimit-Limit-Requests, X-RateLimit-Limit-Concurrency |
| Parallel requests | up to 8 in parallel per key |
| Rate limit | 300 requests per minute per key |
| Trial credit | $0.50 of credit valid 7 days, no card needed · Trial key: 2 parallel requests, 60 req/min; full limits (8 and 300) after first top-up |
| Payment | USDT (TRC20) or USDC (Base), any whole amount from $20 to $500 |
| How you pay | prepaid credit, charged by real token usage; errors and refusals are free |
| Price | input $0.15 / 1M tokens, output $0.50 / 1M tokens |
| Volume bonus | +5% on $50+, +10% on $100+, +15% on $200+ |
| Subscription | paid credit never expires, no subscription |
| Content policy | uncensored for adults; the only hard rule: no sexual content involving minors |
| Sign-in | Google or e-mail and password |
| Key management | one key per account, regenerate any time (the old one stops working) |
Error reference
Every error is JSON with a type you can switch on. You are never charged for an error.
| Code | Type | Meaning |
|---|---|---|
400 | bad_request | malformed request or too long for the context window |
401 | missing_key · invalid_key · key_revoked | check the Authorization header or use your current key |
402 | no_credit | balance is empty — top up, requests resume at once |
403 | content_blocked | refused by the content policy |
404 | not_found | only /v1/chat/completions and /v1/models exist |
413 | request_too_large | body over 8 MB |
429 | rate_limited · concurrency | slow down: rate or parallel limit reached |
503 | upstream_busy | model busy — retry in a few seconds |
Questions and answers
What happens if I exceed the rate limit?
If you exceed 300 requests per minute or 8 concurrent requests, the API returns a 429 error. Pause your requests or reduce concurrency to resolve this. There is no penalty beyond the delay.
Can I use the official OpenAI Python SDK?
Yes. Simply set the base URL to https://api.mistraluncensored.cc/v1 and provide your API key. The SDK handles the rest, including streaming and function calling.
Does my credit expire?
No. Prepaid credit never expires. Your trial credit ($0.50) is valid for 7 days. Claim this credit with one click on your API key page. Regular top-ups remain available indefinitely until used.
Your key is one form away
Create an account, copy the key, change the base URL. That is the whole setup.