EN ▾

Uncensored LLM API for Developersuncensoredlocalllm.cc

Get API key

Integrate Uncensored Local LLM via OpenAI SDK

Developers often seek a straightforward way to接入 an uncensored text model without managing hardware. This guide shows how to use the standard OpenAI SDK to send requests to our hosted service. You get text-in, text-out capabilities with a 100k context window and predictable token billing.

Developer workspace with laptop showing API code and crypto symbols on dark blue background

Understanding the API Endpoint Structure

Before writing code, you need to know where your requests go. Our service provides a hosted endpoint that mimics the standard OpenAI structure. This allows you to use familiar libraries without rewriting your entire integration layer. The base URL for all requests is https://api.uncensoredlocalllm.cc/v1. You do not need to host a model yourself, which saves you from managing GPU resources and VRAM constraints.

The API serves a single uncensored open-weight text model. You specify the model ID as 'uncensored' in your requests. This model does not refuse lawful adult, fictional, security-research, or controversial topics. However, it does enforce a hard limit on sexual content involving minors. Requests violating this rule are refused, while other types of content pass through.

You will interact with three main endpoints. Use POST /v1/chat/completions for standard conversational turns. Use POST /v1/responses for the newer response format if your SDK version supports it. Use GET /v1/models to verify connectivity and list available models. There are no embeddings, image generation, audio processing, or OCR capabilities. If you need those features, you must handle them separately.

The service operates on a prepaid credit system. You pay $0.15 per million input tokens and $0.50 per million output tokens. Errors and refusals do not consume credit. There is no monthly subscription fee, and your paid credit never expires. This model is ideal for developers who want predictable costs without committing to a recurring bill. You can start with a free trial credit of $0.50 upon signup.

Configuring the OpenAI SDK

To connect your application, you need to configure the OpenAI SDK with our specific endpoint. The standard configuration requires you to set the base URL to our service address. You also need to provide your API key, which is generated immediately after signup. You can sign up using Google or an email and password combination. The key is displayed right away, so save it securely.

When initializing the client, point it to https://api.uncensoredlocalllm.cc/v1. Set the model parameter to 'uncensored'. This tells the SDK which model to query. The SDK handles the authentication headers automatically using your key. You do not need to manage complex routing or model selection logic since there is only one model available.

Rate limits are enforced at 300 requests per minute per key. If you exceed this limit, you will receive a 429 error. Your application should handle these errors gracefully by implementing exponential backoff. This ensures your app does not overwhelm the service during peak usage. The limit applies to the key, so if you have multiple keys, each has its own quota.

Authentication errors return a 401 status if the key is invalid. A 402 status indicates you have no remaining credit. These are the primary error codes you will encounter. The service does not offer SLA guarantees or certifications like SOC2. It is an independent service, so you should check the vendor documentation for current terms. Our API focuses on providing reliable text generation without enterprise-level uptime promises.

Sending Text Requests and Handling Responses

Once configured, you can send requests just like you would with any OpenAI-compatible endpoint. The API accepts standard chat messages with system, user, and assistant roles. You can stream responses using Server-Sent Events (SSE). Streaming is useful for real-time displays in chat interfaces. The usage statistics are included in the last chunk of the stream.

You can control the model's behavior using parameters like temperature, top_p, stop sequences, and seed. Temperature adjusts the randomness of the output. Top_p controls nucleus sampling. Stop sequences allow you to halt generation at specific markers. The seed parameter ensures reproducibility for testing. These parameters give you fine-grained control over the model's output style.

Function calling is supported through the tools parameter. You can define tools in your request, and the model will return structured data for tool execution. JSON mode is also available, forcing the model to output valid JSON. This is helpful for integrating with other systems that require strict data formats. The model returns text in, text out, so you handle the parsing in your code.

Context window support is 100,000 tokens for both prompt and completion combined. This large window allows you to pass substantial amounts of context. You can feed in long documents or conversation histories. The model processes the entire context to generate relevant responses. This is particularly useful for applications that require deep understanding of previous interactions or large datasets.

Managing Credit and Payments

Our API uses a prepaid credit system based on real token usage. You top up your account using cryptocurrency. The accepted methods are USDT on the TRC20 network or USDC on the Base network. You can top up any whole amount between $20 and $500. Smaller amounts are not accepted for top-ups. This crypto-only approach avoids the need for credit cards or bank transfers.

Bonus credit is available for larger top-ups. If you top up $50 or more, you receive a bonus ranging from +5% to +15%. This bonus is added to your balance automatically. The credit never expires, so you can use it whenever you need it. There is no monthly fee or subscription required. You only pay for what you use.

New accounts start with $0.50 of trial credit. No credit card is needed to get started. This allows you to test the API before committing to a purchase. You can send requests and see how the model performs. If you run out of credit, you receive a 402 error. You must top up again to continue using the service.

The billing is transparent. You are charged per million tokens. Input tokens cost $0.15 per million, and output tokens cost $0.50 per million. Errors and refusals are free, so you do not pay for failed requests. This model is cost-effective for developers who want to experiment without financial risk. You can monitor your usage through the API responses.

When This API Is Not the Right Choice

While our API is powerful for text generation, it may not be the right choice for every developer. If you need image generation, audio processing, or video creation, this service does not support those features. You must handle those tasks separately or use a different provider. The API is strictly text-in, text-out.

If you require embeddings for vector search, our API does not provide that capability. You cannot use this service for RAG (Retrieval-Augmented Generation) pipelines that rely on embeddings. You would need to generate embeddings elsewhere and feed them into the model as context. The model itself does not produce embeddings.

Fine-tuning is also not available. You cannot train the model on your specific data. The model is fixed, and you can only adjust parameters like temperature and top_p. If you need a model specialized for a niche domain, you might need to look for a provider that offers fine-tuning services.

On-premises deployment is not an option. Our service is hosted, so you do not have control over the underlying hardware. If you need data to stay entirely within your own infrastructure, this hosted solution might not meet your privacy requirements. The service does not claim SOC2 or HIPAA certification, so enterprise compliance might be a concern for some users.

Addressing Community Questions on Reddit

Developers on Reddit often ask about the best uncensored local LLM for long-form roleplay and ERP with RAG support. Threads on r/SillyTavernAI and r/LocalLLM discuss models like Cydonia, BlackXordolphtrongoat, and Gemma finetunes. Users compare these models based on tokens per second, creativity, and context size. They also discuss hardware requirements, such as VRAM and RAM.

Our API addresses the context size and creativity aspects by providing a 100k token window and a model that does not refuse controversial topics. However, it does not offer RAG support natively. You must implement RAG in your application code. The model can process the retrieved context, but it does not retrieve it for you. This makes it suitable for developers who want to build their own RAG pipelines.

For users concerned about hardware, our hosted service removes the need for a local GPU. You do not need an RTX 3090 or 5070 to run the model. This is a significant advantage for developers who want to run complex logic without investing in expensive hardware. The service handles the computational load, allowing you to focus on application development.

When comparing to local models, remember that local models run on your hardware. Our API runs on our servers. This means you pay per token rather than investing in hardware. For developers who want flexibility and scalability, our API is a strong alternative. You can scale up by adding more keys or credits without buying new GPUs.

Best Practices for Integration

When integrating the API, always handle errors gracefully. A 401 error means your key is invalid. A 402 error means you have no credit. A 429 error means you have hit the rate limit. Implement retry logic with exponential backoff for rate limits. This prevents your application from flooding the service with requests.

Use streaming for better user experience. Streaming allows you to display text as it is generated. This reduces the perceived latency for users. The usage statistics are included in the last chunk, so you can track token consumption accurately. This is helpful for billing and monitoring purposes.

Monitor your token usage to avoid unexpected costs. You can estimate costs by calculating the number of tokens and multiplying by the per-million price. Input tokens cost $0.15 per million, and output tokens cost $0.50 per million. Keep track of your balance to ensure you have enough credit for your requests.

Test your integration thoroughly before deploying to production. Use the trial credit to send test requests. Verify that the model responds as expected with different parameters. Check that streaming works correctly and that errors are handled properly. This ensures a smooth experience for your users when you launch your application.

Frequently asked questions

How do I get an API key?

You can sign up using Google or an email and password. The API key is displayed immediately after signup. Save it securely as you will need it for authentication.

What payment methods are accepted?

We accept crypto only: USDT on TRC20 or USDC on Base. Top-ups range from $20 to $500. Credit cards and PayPal are not accepted.

Does the API support image generation?

No, the API is text-in, text-out only. It does not support image, audio, or video generation. You must handle those tasks separately.

What is the context window size?

The context window is 100,000 tokens, including both the prompt and the completion. This allows for long conversations and large context inputs.