EN ▾
Uncensored LLM API for Developershttps://api.uncensoredai.top/v1
Get API key

How to Integrate the Uncensored AI API

Integrating an uncensored AI API lets you bypass content filters for creative, adult, or research use cases while using standard OpenAI SDKs. This guide covers the technical setup, from authentication to streaming, using a pure text-completion endpoint that charges only for actual token usage.

How to Integrate the Uncensored AI API

Updated:

Key points
  • The API uses a standard OpenAI-compatible endpoint at https://api.uncensoredai.top/v1, requiring zero code changes for existing clients.
  • Pricing is transparent at $0.15 per 1M input tokens and $0.50 per 1M output tokens, with no monthly subscriptions.
  • Payments are processed by crypto (USDT on TRC20, USDC on Base), allowing instant top-ups.
  • The model supports streaming, JSON mode, and tool calling within a 100k context window, but does not offer embeddings or vision.

No card needed. After sign-up, claim $0.50 of free test credit with one click (once per person).

Get API key

Why Choose an Uncensored AI API?

Most commercial LLM providers implement aggressive safety filters that can block creative writing, roleplay, or technical analysis of controversial topics. An uncensored ai API removes these arbitrary refusals, allowing the model to answer based on its training data rather than a content policy layer. This is particularly useful for developers building applications that require raw model outputs without post-processing filters.

Unlike model aggregators that route requests to multiple vendors, this service provides a single, dedicated model. This eliminates the unpredictability of routing logic and ensures consistent behavior across requests. The model is an open-weight variant tuned specifically to minimize refusals for lawful adult content, security research, and fictional narratives.

However, 'uncensored' does not mean unlimited. The service still enforces a hard limit on sexual content involving minors. For most other use cases, including mature themes or unconventional logic, the model will generate a response. This approach is ideal for developers who want full control over their application's content strategy without relying on the provider's taste.

Setting Up Your Environment

Integration begins by pointing your OpenAI-compatible SDK to the correct base URL. The endpoint is hosted at https://api.uncensoredai.top/v1. This means you can use the official OpenAI Python or Node.js libraries without rewriting your client logic. You only need to update the base_url parameter and provide your API key.

The service supports a 100,000-token context window, which is significantly larger than many standard offerings. This allows for extensive prompt histories or large document processing. Keep in mind that there is no separate output cap. If you do not specify max_tokens, the response can run to the end of the window.

  • SDK Compatibility: Works with any client that speaks the OpenAI Chat Completions protocol.
  • Context Window: 100k tokens total (input + output).
  • Max Output: up to the end of the 100,000-token window.

Ensure your environment variables are set correctly to avoid latency issues. The API is designed for direct, code-first integration, so there is no web interface to learn. You interact with it purely through HTTP requests.

Authentication and Headers

Authentication is handled via the standard Authorization header. You will receive a single API key upon signup. Unlike services that issue multiple keys per account, this platform enforces one active key per account. If you generate a new key, the previous one is immediately invalidated.

To authenticate a request, include the header: Authorization: Bearer YOUR_API_KEY. The service also provides a GET /v1/models endpoint, which returns the available model information, including the model ID uncensored. This is useful for verifying connectivity before sending complex payloads.

Rate Limits:

  • 300 requests per minute per key.
  • 8 concurrent requests at the same time per key.
  • 8 MB maximum request body size.

These limits are generous for most applications but should be respected to avoid 429 errors. Since there is no subscription tier, these limits apply uniformly to all users regardless of credit balance.

Sending Your First Completion Request

A basic request follows the standard Chat Completions format. You send a JSON payload with the model set to uncensored and your messages array. The service returns a text response. There are no embeddings, vision, or audio endpoints. This is a pure text API.

Example Request:

The following demonstrates a standard chat completion. Replace YOUR_API_KEY with your actual key.

curl https://api.uncensoredai.top/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."}]
  }'

The response will contain the generated text in choices[0].message.content. Errors are returned in standard HTTP format, allowing you to handle retries or failures gracefully. Note that errors do not consume your credit, so you can test freely.

For developers familiar with OpenAI, the experience is identical. The only difference is the base URL and the model's behavior regarding content filters. This consistency reduces the learning curve for teams already using OpenAI-compatible tools.

Handling Streaming Responses

Streaming is supported via Server-Sent Events (SSE). This allows you to receive tokens as they are generated, providing a better user experience for long responses. The streaming endpoint is the same as the non-streaming one; you just set stream: true in your request.

Streaming Benefits:

  • Lower perceived latency for users.
  • Ability to display partial results in real-time.
  • Efficient memory usage as tokens are processed incrementally.

The final chunk of a streaming response includes the token usage statistics. This is important for billing accuracy, as you can track exactly how many tokens were consumed. Errors during streaming may result in partial responses, so your client should handle incomplete chunks gracefully.

Code Example:

from openai import OpenAI

client = OpenAI(base_url="https://api.uncensoredai.top/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)

Ensure your client library handles the SSE stream correctly. Most modern SDKs abstract this away, but understanding the underlying protocol helps in debugging connection issues or parsing errors.

Advanced Features: JSON Mode and Tools

The API supports structured outputs via response_format set to {"type": "json_object"}. This forces the model to return valid JSON, which is essential for integrating with other software systems. This feature is particularly useful for data extraction or generating configuration files.

Function calling is also supported. You can define tools in your request, and the model will return tool calls in its response. This allows for complex workflows where the LLM can trigger external actions. The tool_choice parameter lets you force specific tools or let the model decide.

Key Parameters:

  • temperature: Controls randomness.
  • top_p: Controls diversity.
  • stop: Defines stop sequences.
  • seed: For deterministic responses.

These features make the API suitable for production applications that require reliable, structured data. While the model is uncensored, it still adheres to structural constraints when requested. This balance of freedom and structure is a key advantage for developers building complex agents.

Monitoring Usage and Limits

Usage is tracked per API key. The dashboard shows your current credit balance and recent request history. Since billing is based on real token usage, you can monitor your costs in real-time. The service does not charge for errors or refusals, which can save money during testing phases.

Usage Metrics:

  • Input tokens: Charged at $0.15 per 1M tokens.
  • Output tokens: Charged at $0.50 per 1M tokens.
  • Errors: Free.

You can set up alerts if your client library supports it, but the primary monitoring is done through the account dashboard. The limit of 300 requests per minute ensures fair usage for all users. If you exceed this, you will receive a 429 status code.

For high-volume applications, consider implementing exponential backoff for retries. The service is designed to be reliable, but network issues or rate limits can occur. Tracking your token usage helps you budget effectively, especially since credits do not expire.

Managing Credits via Crypto

Payments are processed by crypto (USDT on TRC20, USDC on Base). The minimum top-up amount is $20, and the maximum is $500. There are no monthly subscriptions or recurring fees.

Bonus Credits:

  • $50 top-up: +5% bonus credit.
  • $100 top-up: +10% bonus credit.

Credits never expire, so you can top up once and use them over time. This is ideal for long-term projects where token consumption varies. The lack of credit card processing fees makes crypto a cost-effective option for developers who already hold stablecoins.

Payment Process:

import OpenAI from "openai";

const client = new OpenAI({ baseURL: "https://api.uncensoredai.top/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);

To pay, generate a deposit address from your dashboard, send the crypto, and the credit is added automatically. Refunds are not available for credits, but errors like double charges are fixed via the Support page. This model reduces friction for global developers who may face banking restrictions.

Questions and answers

Is this API suitable for production use?

Yes, the API is designed for production with support for streaming, JSON mode, and tools. It has a 300 requests per minute limit and 8 concurrent requests, which is sufficient for most applications. However, it does not offer an SLA or uptime guarantee, so you should implement retries in your client.

What happens if I make a request that is refused?

If a request is refused due to the hard content limit (sexual content involving minors), you are not charged for that request. Other refusals, such as those based on the model's own judgment, may still incur token costs. Errors in processing are always free.

Can I use this API with the official OpenAI SDK?

Yes, the API is fully OpenAI-compatible. You only need to change the base URL to https://api.uncensoredai.top/v1 and update your API key. The model ID is 'uncensored'. All other parameters like temperature, top_p, and tools work as documented by OpenAI.

How do I get started with a trial?

New users get $0.50 of trial credit valid for 7 days, one per person. Claim this credit with one click on your API key page. You can sign up using Google or an email address without needing a credit card. This allows you to test the API's latency, response quality, and streaming features before purchasing credits.

Your key is one form away

Create an account, copy the key, change the base URL. That is the whole setup.

Get API key