API Documentation: uncensored Model
Connect your application to our uncensored model using standard OpenAI-compatible endpoints. You receive immediate access with zero configuration hurdles.
https://api.toolcallingllms.com/v1uncensored
Base URL and Authentication
Use the dedicated base URL for all requests. This endpoint handles both text generation and metadata retrieval. Your API key authenticates every call.
Include the key in the Authorization header. The format requires the Bearer prefix. Invalid keys return a 401 status code immediately. Do not guess the token format. Use the key shown after signup.
Chat Completions Endpoint
Send messages to generate text responses. The endpoint accepts standard JSON payloads. Define your system and user roles clearly.
Structure your request with the model field set to uncensored. The API processes the input and returns generated text. Errors return a 402 status if credit is insufficient. Rate limits trigger a 429 response.
Supported Parameters
Control generation behavior with standard parameters. Adjust temperature for creativity or determinism. Use top_p to filter low-probability tokens. Set max_tokens to limit output length. The default max is 2,048 tokens unless specified otherwise.
You can also set seed for reproducible results. Use stop sequences to halt generation early. The API supports presence_penalty and frequency_penalty for style control.
Streaming and SSE
Enable real-time output by setting stream to true. The server sends Server-Sent Events (SSE) as tokens are generated. This reduces perceived latency for long responses.
Parse each chunk to update your UI incrementally. The final chunk contains the total token usage statistics. This method works reliably with standard HTTP clients that support SSE.
Function Calling and JSON Mode
Define tools in your request to enable function calling. The model decides when to invoke a tool based on context. Pass tool definitions with name, description, and parameters.
For strict JSON output, set response_format to {"type": "json_object"}. This ensures the response is valid JSON. Use this for parsing structured data reliably. Tool calls return content with tool IDs for execution.
Limits, Errors, and Context
The context window supports 100,000 tokens total. This includes both prompt and completion tokens. Requests exceeding this limit fail. The maximum request body size is 8 MB.
Rate limits allow 300 requests per minute per key. Concurrent requests are capped at 8 per key. A 401 error means your key is invalid. A 402 error indicates insufficient prepaid credit. A 429 error signals you have hit the rate limit. Wait before retrying.
cURL
curl https://api.toolcallingllms.com/v1/chat/completions \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "uncensored",
"messages": [{"role": "user", "content": "Generate 200 tokens of safe text"}]
}'Python
from openai import OpenAI
client = OpenAI(base_url="https://api.toolcallingllms.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.toolcallingllms.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
How do I authenticate my requests?
Include your API key in the Authorization header as a Bearer token. Use the key generated after signing up. The key is unique to your account.
What happens if I run out of credit?
Requests return a 402 status code. No tokens are consumed for failed requests. You must top up your prepaid balance to resume usage.
Does the uncensored model support tool calling?
Yes, the model supports function calling and JSON mode. Define tools in your request payload. The model will invoke tools based on the input context.
Get your API key
Register, copy the token, update your endpoint URL. Simple as that.