Uncensored Model API Quickstart
Get started with the uncensored model API in minutes using standard OpenAI-compatible tools. This quickstart guides you through authentication, requests, streaming, and error handling for direct integration.
Prerequisites: API Key and Base URL
Sign up and retrieve your API key immediately via Google or email without phone verification. The base URL is HTTPS://api.apimodel.cc/v1, which works with any standard OpenAI-compatible client by updating the base_url parameter. You receive a single active key per account that replaces the previous one upon generation.
Ensure you have a prepaid crypto balance or use the $0.50 trial credit valid for 7 days. You will need this key to authenticate your requests to the uncensored model API.
Sending Your First Request to the Model API
Send a POST request to /v1/chat/completions with the model ID set to "uncensored". This endpoint accepts text input and returns text output without content refusals for lawful adult use. The model has a 100,000 token context window, allowing substantial prompt sizes.
curl https://api.apimodel.cc/v1/chat/completions \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "uncensored",
"messages": [{"role": "user", "content": "What is the capital of Australia?"}]
}'The response includes the generated text in the choices array. You are charged only for real token usage, with errors and refusals being free. This direct approach ensures predictable billing without hidden subscription fees.
Configuring Parameters: Temperature, Top P, and Seed
Adjust temperature for randomness, top_p for nucleus sampling, and seed for reproducible outputs. These parameters allow fine-tuning of the uncensored model's behavior for specific use cases like coding or creative writing. Setting a seed ensures consistent results across multiple requests, which is crucial for debugging.
The API supports standard parameters like presence_penalty and frequency_penalty. Use these to control repetition and ensure the model stays on topic. Configure these settings in your request body to tailor the response style precisely.
Enabling Streaming and Reading Token Usage
Enable streaming by setting the stream parameter to true to receive token-by-token responses via Server-Sent Events. Token usage details are provided in the final chunk of the stream, allowing real-time billing transparency. This method reduces perceived latency for long responses.
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 the stream events in your client code to update the UI incrementally. The uncensored model API delivers text continuously, improving the user experience for chat applications. Streaming is optional but recommended for interactive applications.
Using Function Calling and JSON Mode
Utilize function calling with the tools parameter to enable the model to generate structured data. This feature supports tool_choice and allows the model to execute specific actions based on input. JSON mode via response_format json_object ensures strict JSON output for reliable parsing.
import OpenAI from "openai";
const client = new OpenAI({ baseURL: "https://api.apimodel.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);Define your function schemas in the request to guide the model's output structure. This capability is essential for building agentic workflows or integrating with external APIs. The uncensored model handles complex tool definitions without content refusals.
Handling Errors and Token Limits
Monitor HTTP status codes for common issues: 401 for invalid keys, 402 for insufficient credit, and 429 for rate limits. The API enforces 300 requests per minute per key and 8 concurrent requests. Each request body must be under 8 MB.
Max output is 16,000 tokens per request, with a default of 2,048 if max_tokens is unset. Errors are free, so failed requests do not consume your prepaid credit. Use these limits to design robust retry logic for your application.
Python
from openai import OpenAI
client = OpenAI(base_url="https://api.apimodel.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)FAQ
What is the uncensored model API base URL?
The base URL is HTTPS://api.apimodel.cc/v1. It is compatible with standard OpenAI SDKs by setting the base_url parameter. Use this URL for all chat completions requests.
How do I handle rate limits?
The API allows 300 requests per minute and 8 concurrent requests per key. A 429 status code indicates you have exceeded these limits. Implement exponential backoff in your client to handle retries gracefully.
Does the uncensored model support streaming?
Yes, set the stream parameter to true to receive Server-Sent Events. Token usage is reported in the final chunk. This allows real-time display of responses in your application.
Secure your API key
Register, retrieve your key, and update the base URL. That is the entire setup.