API Documentation for Uncensored AI
Get your API key and start sending requests in seconds. This uncensored AI coding API works with standard OpenAI SDKs, letting you integrate unrestricted model capabilities directly into your workflow.
https://api.uncensoredaicoding.com/v1
Base URL and Authentication
The base URL for all requests is https://api.uncensoredaicoding.com/v1. You authenticate by passing your unique API key in the Authorization header. The format is Bearer YOUR_API_KEY. This header ensures your requests are routed correctly to the dedicated uncensored model. We do not use query parameters for authentication. Keep your key secure. Rotate it via the dashboard if needed. The key grants access to chat completions. It does not grant access to other endpoints. You get one key per account. A new key replaces the old one instantly. This design eliminates subscription friction. You pay for what you use. Prepaid credit covers your usage. Errors and refusals do not consume credits. Start with the trial credit.
First Request
Send your first prompt to the chat completions endpoint. The model ID is uncensored. This model handles text input and generates text output. It does not refuse lawful adult or controversial topics. The request structure mirrors standard OpenAI formats. You can use any compatible client library. Adjust the base URL in your client configuration. Set the model field to uncensored. Provide a system prompt if needed. Add user messages in the messages array. The API returns a response object. Include token usage data. This confirms your setup works. Test with a simple query. Verify the response format. This step validates your integration. Proceed to more complex prompts. The uncensored AI coding API is ready.
Python SDK Integration
Use the official OpenAI Python library for easy integration. Configure the base URL to point to our API. Set the API key in the environment or client. The model parameter should be uncensored. This allows you to use familiar methods. Call chat.completions.create() with your messages. The library handles JSON serialization. You receive a structured response object. Access the generated text via response.choices[0].message.content. This approach reduces boilerplate code. It ensures type safety. Use async methods for high throughput. The SDK manages retries. Handle exceptions for rate limits. This setup is reliable. It works with existing codebases. Integrate uncensored capabilities quickly.
Node.js SDK Usage
The Node.js SDK follows the same patterns. Install the OpenAI package. Initialize the client with your base URL. Set the API key correctly. Use chat.completions.create() for requests. Pass the model as uncensored. The response includes content and usage. Access the text programmatically. This SDK supports promises. Use async/await for clean code. Handle errors gracefully. Rate limits return specific status codes. Token usage is tracked. This integration is straightforward. It fits into Express or standalone scripts. The uncensored AI coding API works seamlessly. Deploy your NSFW or unrestricted apps. Scale your backend efficiently.
Streaming Responses
Enable streaming by setting stream: true in your request. The API returns chunks via Server-Sent Events (SSE). Each chunk contains partial text. Process these chunks in real time. This improves user experience for long outputs. The final chunk includes token usage data. Track input and output tokens accurately. This data helps monitor costs. Streaming works with all parameters. Temperature and top-p apply normally. Function calling works in streaming mode. Handle the stream events carefully. Buffer partial responses if needed. This feature supports interactive apps. The uncensored AI coding API handles streams reliably. Ensure your client reads the full stream.
Limits, Errors, and Context
The context window supports 100,000 tokens total. This includes both prompt and completion. Max output is 16,000 tokens per request. Set max_tokens to control output length. The default is 2,048 tokens. Rate limits allow 300 requests per minute. Concurrent requests are capped at 8. Request bodies must stay under 8 MB. Errors return standard HTTP codes. A 401 status means an invalid key. A 402 status indicates no credit. A 429 status signals rate limiting. Refunds are not issued for credits. Mistakes are fixed via support. Use these limits to plan your architecture. Monitor usage to avoid surprises.
cURL
curl https://api.uncensoredaicoding.com/v1/chat/completions \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "uncensored",
"messages": [{"role": "user", "content": "list available endpoints for user data retrieval"}]
}'Python
from openai import OpenAI
client = OpenAI(base_url="https://api.uncensoredaicoding.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.uncensoredaicoding.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)Frequently asked questions
How does the uncensored AI coding API handle content restrictions?
The model does not refuse lawful adult, fictional, or controversial topics. It allows NSFW content but always blocks sexual content involving minors. This ensures broad usability while maintaining a hard limit. You can generate uncensored coding outputs without standard filters.
What is the cost structure for the uncensored AI API?
Input tokens cost $0.15 per million. Output tokens cost $0.50 per million. You pay only for actual usage. Errors and refusals are free. Credits do not expire. This prepaid model ensures transparency. No hidden fees apply to your account.
Can I use this API with local tools like LM Studio?
Yes, but you need the cloud base URL. LM Studio typically runs local models. You can configure it to point to our endpoint. This allows you to use your existing workflow. The API key authenticates your requests. Streaming and tools work as expected. This bridges local convenience with cloud scale.
Get your API key instantly
Sign up, copy the token, update the base URL. That’s it.