Integrate the uncensored LLM API
Integrate the uncensored LLM API into your application using standard OpenAI-compatible protocols. This guide covers the essential steps to send requests, handle streaming, and manage your API key.
Prerequisites and SDK Installation
Install the official SDK for your preferred language to communicate with the endpoint. You need Python 3.7+ or Node.js 18+ with an active API key. The client libraries handle serialization and retry logic automatically. This ensures your integration remains stable under varying load conditions.
Required versions: Python openai>=1.0.0 or Node [email protected]. These packages support the modern streaming and tool-calling interfaces.
Setting the Base URL
Point your SDK client to our specific base URL to route traffic correctly. This ensures you connect to the uncensored model rather than the default OpenAI endpoint. The base URL is https://api.iasenzacensura.com/v1.
Configure the base URL in your client initialization code. This single change redirects all subsequent calls to our infrastructure. You can verify the connection by calling GET /v1/models and checking for the uncensored model ID.
Authentication with API Key
Pass your API key in the Authorization header for every request. Use the format Bearer YOUR_API_KEY to authenticate your identity. The key is generated immediately after signing up with Google or email.
Keep your key secure. It provides access to your prepaid credit. If you lose the key, generate a new one from the dashboard; the old key becomes invalid immediately. This ensures your unused balance remains protected from unauthorized usage.
Sending a Chat Completion Request
Send a POST request to /v1/chat/completions with your prompt and model ID. The model ID is uncensored. This returns a text response without content refusals for lawful adult use.
curl https://api.iasenzacensura.com/v1/chat/completions \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "uncensored",
"messages": [{"role": "user", "content": "List the top 5 Python web frameworks"}]
}'The response includes token usage statistics. Input tokens cost $0.15 per million; output tokens cost $0.50 per million. Errors do not consume credit, which protects your balance during testing phases.
Handling Streaming Responses (SSE)
Enable streaming by setting stream: true in your request body. This returns Server-Sent Events (SSE) for real-time token delivery. You receive partial tokens as they are generated, reducing perceived latency significantly.
from openai import OpenAI
client = OpenAI(base_url="https://api.iasenzacensura.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)Each chunk contains partial text and usage data. The final chunk includes the total token count for the request. Parse these events to update your UI incrementally. This is ideal for chat interfaces where users expect immediate feedback.
Configuring Parameters and Tools
Customize generation behavior using standard parameters like temperature, top_p, and stop. Set response_format to {"type": "json_object"} for structured output. Enable function calling by passing a tools array.
import OpenAI from "openai";
const client = new OpenAI({ baseURL: "https://api.iasenzacensura.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);These parameters control randomness and structure. Higher temperatures increase creativity; lower values improve precision. Tool definitions allow the model to invoke external functions dynamically. This enables complex workflows without external parsing logic.
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)Support Q&A
Is this the only uncensored ia API available?
No, but our API is optimized for developer integration speed and transparent prepaid pricing. We host a single uncensored model, ensuring consistent behavior without routing overhead. Other services may offer multiple models or different pricing structures.
What happens if I exceed the rate limit?
You receive a 429 Too Many Requests error. The limit is 300 requests per minute per key. Wait briefly before retrying or upgrade your usage tier if needed. Burst limits allow 8 concurrent requests per key.
Can I use this for commercial applications?
Yes, provided the content is lawful and does not involve minors. Your prompts are not used for training, ensuring privacy. You pay only for tokens consumed, with no monthly subscription fees required.
Generate your key in seconds
Register an account, retrieve the token, update your endpoint URL. That covers the entire configuration.