Integrating Uncensored Text API with Character Consistency
Maintaining character consistency in AI-generated text is a common challenge for developers building chat applications or interactive stories. This guide explains how to integrate our uncensored text API to ensure your characters stay true to their defined voices across multiple turns.

Understanding the API Interface
Integrating an uncensored text API requires understanding its specific interface and capabilities. Our service offers a hosted API that serves one open-weight text model, identified by the model id uncensored. The primary endpoint for chat completions is POST /v1/chat/completions, which accepts text input and returns text output. This simple text-in, text-out design makes it easy to integrate into various applications without dealing with complex multimedia processing.
The API supports several features that are important for character consistency, including streaming over Server-Sent Events (SSE) and function calling. Streaming allows your application to receive responses in real-time, which enhances the user experience by providing immediate feedback. Function calling enables you to define tools that the model can use, adding flexibility to how characters interact with their environment.
Parameters such as temperature, top_p, stop sequences, and seed allow you to fine-tune the model's behavior. Temperature controls the randomness of the output, while top_p limits the diversity of tokens considered. The seed parameter ensures reproducibility, which is useful for testing and debugging. These settings help you maintain a consistent character voice across different interactions.
Additionally, the API supports JSON mode, which can be useful for structuring responses in a predictable format. This is particularly helpful when building applications that require specific data structures from the AI. By using these features, you can create a more engaging and consistent character experience for your users.
Setting Up Context for Character Consistency
One of the key challenges in maintaining character consistency is managing the context window. Our API provides a context window of 100,000 tokens, which includes both the prompt and the completion. This large context window allows you to include detailed character descriptions, backstory, and previous conversation turns in each request. By keeping the character's profile in the context, you ensure that the model has all the necessary information to generate consistent responses.
To maximize the effectiveness of the context window, you should structure your prompts carefully. Include a clear description of the character's personality, speech patterns, and key traits at the beginning of the prompt. You can also include examples of previous conversations to illustrate how the character typically responds. This helps the model understand the desired tone and style of the character.
It is important to monitor the token usage to ensure you stay within the 100,000-token limit. You can estimate token usage by dividing the total number of tokens by 1,000,000 and multiplying by the per-million price. This helps you budget for your API usage and avoid unexpected costs. Remember that errors and refusals are free, so you can experiment with different prompt structures without worrying about incurring charges for failed requests.
By effectively managing the context window and structuring your prompts, you can create a more consistent and engaging character experience. The large context window allows for rich, detailed interactions that keep the character true to their defined persona.
Configuring Parameters for Consistent Output
Configuring the API parameters is essential for achieving consistent character output. The temperature parameter controls the randomness of the model's responses. A lower temperature results in more deterministic and consistent outputs, while a higher temperature introduces more variability. For character consistency, you may want to start with a lower temperature to ensure the character stays in character.
The top_p parameter limits the diversity of tokens considered by the model. Setting top_p to a lower value restricts the model to the most likely tokens, which can help maintain consistency. However, setting it too low may make the responses feel repetitive. Finding the right balance between temperature and top_p is key to achieving the desired level of consistency and variety.
The seed parameter allows you to set a starting point for the random number generator. This ensures that the same prompt will produce the same output, which is useful for testing and debugging. By using a fixed seed, you can reproduce specific responses and verify that your character settings are working as expected.
Additionally, you can use stop sequences to control when the model stops generating text. This is useful for ensuring that the character's responses are concise and focused. By carefully configuring these parameters, you can create a more consistent and engaging character experience for your users.
Implementing Streaming and Real-Time Updates
Streaming over Server-Sent Events (SSE) is a powerful feature of our API that allows for real-time updates in your application. This is particularly useful for chat applications where users expect immediate responses. By enabling streaming, you can provide a smoother and more interactive experience for your users.
To implement streaming, you need to handle the SSE events in your application. The API sends usage information in the last chunk of the stream, which allows you to track token usage in real-time. This is useful for monitoring your API usage and ensuring that you stay within your budget.
Streaming also allows you to display the character's responses as they are generated, which can enhance the user experience. You can update your application interface with each chunk of text, providing a more dynamic and engaging interaction. This is particularly effective for character-driven applications where the flow of conversation is important.
By using streaming, you can create a more responsive and interactive character experience. The real-time updates ensure that users feel engaged and connected to the character, making the interaction more immersive and enjoyable.
When Our API Is Not the Right Choice
While our uncensored text API is powerful, it may not be the right choice for every project. If your application requires image, audio, or video generation, our API is not suitable. The API serves only text, so you will need to integrate other services for multimedia capabilities. Similarly, if you need embeddings, OCR, or fine-tuning, our API does not support these features.
Our API is also not ideal if you need model routing or on-prem deployment. It is a hosted service that serves a single open-weight text model. If you require the ability to switch between different models or deploy the model on your own infrastructure, our API may not meet your needs.
Additionally, if you need a free unlimited tier or an SLA with specific uptime guarantees, our API may not be the best fit. Our pricing is based on token usage, and we do not offer a free unlimited tier. While we provide a trial credit, ongoing usage requires prepaid credit.
Finally, if your application requires specific certifications such as SOC2, HIPAA, or ISO, our API does not currently offer these. If these certifications are critical for your project, you may need to consider other options. Understanding these limitations helps you determine if our API is the right fit for your specific use case.
Addressing Common Developer Questions
Developers often ask about integrating uncensored AI APIs into applications that require consistent character portrayal. Threads on r/LocalLLM discuss the challenges of maintaining character consistency in local AI models, with users seeking solutions for keeping characters consistent from panel to panel in comic generation. Similarly, discussions on r/CharacterAi_NSFW highlight the desire for no-filter AI chats that feel like natural conversations rather than rigid chatbots.
Another common question is whether developers would pay for a reliable, uncensored LLM API. This is a topic of discussion on r/startup, where developers consider the value of a consistent and reliable uncensored API for their projects. Users also ask about the best uncensored models available, comparing options like abliterated, heretic, and uncensored models.
Some developers are interested in building bot applications without filters, as seen in discussions on r/botify_ai. They seek APIs that allow for unfiltered interactions, which can be useful for creating more immersive and engaging bot experiences. Additionally, there is interest in cheap uncensored AI image generators, although our API focuses on text.
By addressing these common questions, we can help developers understand how to best integrate our API into their projects. Understanding the needs of the community helps us provide a more tailored and effective solution for character consistency and uncensored AI interactions.
Pricing and Payment Methods
Our API offers a transparent pricing model based on token usage. The cost is $0.15 per 1 million input tokens and $0.50 per 1 million output tokens. You can estimate your costs by dividing the number of tokens by 1,000,000 and multiplying by the respective per-million price. This allows you to budget effectively for your API usage.
Payments are accepted only in cryptocurrency, specifically USDT on TRC20 or USDC on Base. You can top up your account with any whole amount from $20 to $500. If you top up with $50 or more, you receive a bonus credit ranging from +5% to +15%. This bonus credit can help you get more value from your API usage.
There is no subscription or monthly fee, and your prepaid credit never expires. Errors and refusals are free, so you can experiment with different prompts and settings without worrying about incurring charges for failed requests. This flexible pricing model allows you to scale your usage based on your needs.
To get started, you can sign up with Google or an email and password. Upon signup, you receive $0.50 of trial credit, allowing you to test the API without any initial investment. This trial credit gives you a chance to explore the API's capabilities and determine if it meets your requirements.
Frequently asked questions
How do I maintain character consistency in my AI chat app?
You can maintain character consistency by including detailed character descriptions and previous conversation turns in the API's 100,000-token context window. Using parameters like temperature and seed helps control the randomness and reproducibility of responses.
What payment methods are accepted for the API?
The API accepts only cryptocurrency payments, specifically USDT on TRC20 or USDC on Base. You can top up with amounts between $20 and $500, and receive bonus credit for larger top-ups.
Does the API support streaming responses?
Yes, the API supports streaming over Server-Sent Events (SSE). This allows for real-time updates in your application, enhancing the user experience by providing immediate feedback as the character generates responses.
Is there a free trial available?
Yes, every new account receives $0.50 of trial credit, and no card is needed to sign up. This allows you to test the API and its features without any initial financial commitment.