EN ▾

Uncensored text API for AI image pipelines

Get API key

Integrating UncensoredAI API: Settings & SDK Checklist

Developers often struggle to configure OpenAI-compatible endpoints for reliable text output. This guide provides a step-by-step integration process and a tested checklist to ensure your requests hit the right model without unnecessary overhead.

Developer workspace with monitor showing text code and neural network graphic

Understanding the Base Configuration

Before writing any code, you need to establish the correct base URL for your API requests. The endpoint is hosted at https://api.uncensoredaiimage.cc/v1. This is the root URL for all your API calls, including chat completions and model information. Unlike other services that might have multiple regions or endpoints, this service uses a single, consistent base URL for all operations.

You will be interacting with a single uncensored open-weight text model. The model ID you must send in your requests is simply uncensored. This ensures that your requests are routed to the correct model that does not refuse lawful adult, fictional, security-research, or controversial topics. It is important to use this exact model ID to avoid errors or unexpected behavior.

The API follows the OpenAI-compatible format for chat completions. This means you can use existing SDKs and libraries that are designed for OpenAI, making integration easier for developers who are already familiar with that ecosystem. The API supports text in and text out, providing a straightforward interface for generating responses.

When setting up your environment, ensure that your base URL is correctly configured in your SDK or HTTP client. This foundational step is important for all subsequent requests. Without the correct base URL, your requests will fail to reach the service, leading to connection errors or timeouts.

Essential SDK Parameters for Output Control

Once your base URL is set, you need to configure the parameters that control how the model generates text. The API supports several key parameters that allow you to fine-tune the output. These include temperature, top_p, stop, seed, and various penalties. These parameters give you precise control over the creativity and consistency of the generated text.

The temperature parameter controls the randomness of the output. A lower value makes the output more deterministic, while a higher value increases creativity. The top_p parameter sets the nucleus sampling threshold, which further refines the selection of tokens. Adjusting these values allows you to balance between coherent, predictable responses and more creative, varied outputs.

You can also use the stop parameter to specify sequences that will terminate the response. This is useful for controlling the length of the output or stopping the model at specific points. The seed parameter allows you to set a random seed for reproducibility, ensuring that you get the same output for the same input if needed.

Penalties can be applied to discourage certain tokens or patterns in the output. This is particularly useful for avoiding repetitive or unwanted content. By carefully adjusting these parameters, you can tailor the API's behavior to fit your specific use case, whether it is creative writing, code generation, or data extraction.

Handling Streaming and Function Calling

The API supports streaming over Server-Sent Events (SSE), which allows you to receive responses in real-time as they are generated. This is particularly useful for applications that require immediate feedback, such as chat interfaces or live data feeds. Streaming also includes usage information in the last chunk, helping you track token consumption accurately.

In addition to streaming, the API supports function calling, also known as tools. This feature allows the model to call specific functions based on the input, enabling more complex interactions and integrations with external systems. Function calling is essential for building applications that require the API to perform actions or retrieve data from other sources.

When implementing streaming, ensure that your SDK is configured to handle SSE correctly. This typically involves setting up event listeners or callbacks to process the incoming data chunks. For function calling, you need to define the available functions and their schemas, which the model will use to determine when and how to call them.

Both streaming and function calling enhance the versatility of the API, allowing you to build more dynamic and interactive applications. By using these features, you can create experiences that are more engaging and responsive to user input, improving the overall user experience.

Token Management and Pricing Structure

Understanding the pricing structure is important for managing costs effectively. The API charges $0.15 per 1 million input tokens and $0.50 per 1 million output tokens. Prepaid credit is charged based on real token usage, meaning you only pay for what you use. Errors and refusals are free, which can help reduce costs in scenarios where many requests result in errors or are filtered out.

The context window for the API is 100,000 tokens, which includes both the prompt and the completion. This large context window allows you to process long documents or maintain extended conversations without losing context. It is important to monitor your token usage to ensure you do not exceed your prepaid credit balance.

Top-ups can be made using cryptocurrency, specifically USDT on TRC20 or USDC on Base. The minimum top-up amount is $20, and the maximum is $500. If you top up from $50, you receive a bonus credit ranging from +5% to +15%. This bonus can help you get more value from your purchases, especially for larger top-ups.

Since there is no subscription or monthly fee, and paid credit never expires, you can manage your budget flexibly. However, it is important to keep track of your usage to avoid running out of credit unexpectedly. The API also has a rate limit of 300 requests per minute per key, which you should consider when designing your application's request patterns.

When This API Is Not the Right Choice

While this API is powerful for text generation, it is not suitable for all use cases. It is important to recognize when this service might not be the best fit for your project. For example, if you need image, audio, video, or OCR generation, this API does not support those capabilities. It is strictly a text-to-text service.

Similarly, if you require embeddings, fine-tuning, or model routing, this API does not offer those features. It serves a single uncensored open-weight text model, so you cannot route requests to different models or fine-tune the model for specific tasks. If these features are critical to your application, you may need to consider other services.

Additionally, if you need real-time translation or search capabilities, this API does not provide those functions. It is designed for generating text responses based on input prompts, not for performing complex data retrieval or translation tasks. Understanding these limitations helps you decide if this API aligns with your project's needs.

Finally, if you require a service with specific SLA guarantees or certifications like SOC2 or HIPAA, this API does not claim those. It is an independent service focused on providing uncensored text generation. If these factors are important for your use case, you should verify if this API meets your requirements before integrating it.

Addressing Community Questions on Configuration

Developers in communities like r/LocalLLaMA and r/BrandNewSentence often discuss the challenge of finding uncensored AI that is also technically advanced. Many users want an AI that acts like a tool rather than a restrictive guardrail, but without becoming overly simplistic or 'horny' in its responses. This guide addresses those concerns by showing how to configure the API for balanced, high-quality output.

Users also discuss the trade-offs of uncensored models, noting that some techniques to remove censorship can make the model less intelligent. By using the correct parameters like temperature and top_p, you can mitigate some of these issues and achieve a good balance between creativity and coherence. The API's flexibility allows you to tune these settings to find the right sweet spot for your needs.

Another common question is how to handle specific topics like security research or controversial subjects. The uncensored nature of the model allows it to engage with these topics without unnecessary refusals, provided they are lawful. This makes it suitable for developers working on tools for research, creative writing, or data analysis where traditional models might be too restrictive.

By following this checklist, you can ensure that your integration is reliable and meets the expectations of users who value both freedom and functionality in AI tools. The key is to experiment with the parameters and find the configuration that best suits your specific application.

Final Integration Checklist for Developers

Before deploying your integration, ensure you have completed all the following steps. First, verify that your base URL is set to https://api.uncensoredaiimage.cc/v1 and that you are using the correct model ID, uncensored. This ensures that your requests are routed correctly to the uncensored model.

Next, confirm that your SDK is configured to handle streaming and function calling if you plan to use these features. Set up your event listeners for SSE and define your function schemas. This will allow you to use the full capabilities of the API for real-time and interactive applications.

Check your parameter settings for temperature, top_p, and other controls to ensure they align with your desired output style. Adjust these values as needed to balance creativity and coherence. Also, verify that your error handling is in place to manage cases like invalid keys (401), no credit (402), or rate limits (429).

Finally, monitor your token usage and prepaid credit balance to ensure you do not run out of funds. Remember that top-ups are done via crypto, and you can receive bonuses for larger amounts. By following this checklist, you can ensure a smooth and efficient integration with the uncensored AI API.

Frequently asked questions

How do I top up my prepaid credit?

You can top up your prepaid credit using USDT on TRC20 or USDC on Base. The minimum amount is $20, and the maximum is $500. If you top up from $50, you receive a bonus credit ranging from +5% to +15%.

What happens if I run out of credit?

If you run out of credit, you will receive a 402 error. You can continue to use the API by topping up your prepaid credit. Errors and refusals are free, so you only pay for successful token usage.

Can I use this API for image generation?

No, this API is strictly for text-to-text generation. It does not support image, audio, video, or OCR generation. If you need those capabilities, you may need to use a different service.

Is there a rate limit on the API?

Yes, the rate limit is 300 requests per minute per key. If you exceed this limit, you will receive a 429 error. You should design your application to handle this limit appropriately.