Troubleshooting Uncensored TTS Output Quality
Developers often encounter truncated or low-quality text when using our uncensored API for text-to-speech pipelines. This guide explains how to adjust parameters like temperature and max tokens to stabilize output quality. We also cover rate limits and error handling to help you build reliable integrations.

Understanding Output Truncation
When your uncensored API returns truncated text, it is often due to hitting the max tokens limit or encountering a hard content filter. Our model refuses requests involving sexual content with minors, which can cause abrupt stops if the prompt triggers this specific filter. To mitigate this, ensure your prompts are clear and avoid ambiguous phrasing that might trigger the refusal mechanism unnecessarily.
Another common cause is the context window limit of 100,000 tokens. If your conversation history grows too large, the model may struggle to generate coherent completions. Monitor your token usage closely, especially in long-running sessions, to ensure you stay within the limit. This helps maintain the quality of the output and prevents unexpected truncation.
Additionally, the model's temperature setting plays a important role in output quality. A higher temperature can lead to more creative but potentially incoherent text, while a lower temperature produces more stable and predictable results. Experiment with different temperature values to find the right balance for your specific use case. This adjustment can significantly improve the readability and relevance of the generated text.
Finally, consider the structure of your prompts. Clear and well-structured prompts help the model understand the desired output better. Avoid overly complex or nested instructions that might confuse the model. By simplifying your prompts and adjusting parameters, you can reduce the likelihood of truncated or low-quality outputs.
Adjusting Temperature and Top_P
Temperature and top_p are key parameters that influence the randomness and diversity of the model's output. Temperature controls the randomness of the predictions, with higher values leading to more diverse but potentially less coherent text. Lower values make the output more deterministic and focused. For TTS pipelines, a moderate temperature often yields the best balance between creativity and coherence.
Top_p, or nucleus sampling, limits the model to consider only the top percentage of tokens whose cumulative probability exceeds the threshold. This helps in reducing the likelihood of nonsensical or irrelevant tokens in the output. Combining temperature and top_p allows for fine-tuned control over the generation process, ensuring that the text is both engaging and relevant.
Experiment with different combinations of temperature and top_p to find the optimal settings for your application. Start with a temperature of 0.7 and a top_p of 0.9, and adjust based on the output quality. If the text is too random, lower the temperature. If it is too repetitive, increase the top_p. This iterative process helps in achieving the desired output quality.
It is also important to note that these parameters can affect the speed of generation. Higher values may lead to longer generation times due to the increased diversity of tokens. Consider the trade-off between output quality and latency when adjusting these settings. For real-time TTS applications, finding the right balance is important to maintain a smooth user experience.
Managing Context Window Limits
The 100,000 token context window is a generous limit, but it can be exhausted in long conversations or large data processing tasks. When the context window is full, the model may struggle to generate coherent responses, leading to truncated or low-quality output. To manage this, implement a strategy to truncate or summarize older messages in the conversation history.
One effective approach is to maintain a sliding window of the most recent messages. This ensures that the model always has access to the most relevant context without exceeding the token limit. By trimming older messages, you can keep the context window within bounds and maintain the quality of the output. This is particularly useful for chatbots and interactive applications.
Another strategy is to use the JSON mode to structure your data. This can help in managing the context more efficiently by reducing the amount of text that needs to be processed. JSON mode allows for structured data exchange, which can be more compact and easier to manage than plain text. This can help in optimizing the use of the context window.
Regularly monitor your token usage to ensure you are not approaching the limit. Our API provides usage statistics in the last chunk of the streaming response, allowing you to track token consumption in real-time. This visibility helps in proactively managing the context window and avoiding unexpected truncation. By staying within the limit, you can ensure consistent output quality.
Handling Rate Limits and Errors
Rate limits are a critical aspect of using our API. With a limit of 300 requests per minute per key, it is essential to implement retry logic to handle 429 errors gracefully. When a rate limit is hit, the API returns a 429 status code, indicating that the client has sent too many requests in a given time frame. Implementing exponential backoff in your retry logic can help in managing these limits effectively.
Additionally, monitor your credit balance to avoid 402 errors, which occur when there is insufficient credit. Our API charges $0.15 per 1M input tokens and $0.50 per 1M output tokens. Prepaid credit is charged by real token usage, and errors and refusals are free. Ensure that you have enough credit to avoid interruptions in your service. Regularly check your balance and top up as needed.
Errors such as 401 (invalid key) and 429 (rate limit) are common issues that can disrupt your application. Implement reliable error handling to detect and respond to these errors appropriately. For 401 errors, verify your API key and ensure it is correct. For 429 errors, implement a retry mechanism with exponential backoff to handle rate limits without overwhelming the server.
It is also important to handle refusals gracefully. If the model refuses a request due to content filters, log the refusal and inform the user. This helps in maintaining a good user experience even when the model decides not to generate a response. By handling errors and refusals effectively, you can ensure a smoother operation of your application.
Optimizing for TTS Pipelines
When integrating our API with TTS pipelines, it is important to consider the format of the output. Our API supports JSON mode, which can be useful for structured data exchange. By using JSON mode, you can ensure that the output is well-structured and easy to parse for your TTS engine. This can help in reducing errors and improving the overall quality of the TTS output.
Streaming over SSE (Server-Sent Events) is another feature that can enhance the performance of your TTS pipeline. Streaming allows for real-time feedback, which can be important for applications that require immediate responses. By using streaming, you can reduce the latency between the API response and the TTS generation, leading to a more responsive user experience.
Function calling (tools) is also a valuable feature for TTS pipelines. It allows the model to call external functions, which can be useful for retrieving additional data or performing specific tasks. By using function calling, you can enhance the functionality of your TTS pipeline and provide more dynamic and interactive experiences for users.
Finally, consider the parameters such as stop tokens and seeds. Stop tokens allow you to define specific sequences that signal the end of the generation, which can be useful for controlling the length of the output. Seeds can be used to ensure reproducibility of the output, which is important for testing and debugging. By utilizing these parameters, you can have more control over the generation process and ensure consistent results.
When Our API Is Not the Right Choice
While our API is excellent for uncensored text generation, it may not be the right choice for all use cases. If you require embeddings, image generation, audio or video generation, OCR, or fine-tuning, our API does not support these features. Our service is focused on text-in, text-out capabilities with a single uncensored open-weight model. If your application requires multimodal capabilities, you may need to consider other solutions.
Additionally, if you need on-prem deployment or specific certifications like SOC2, HIPAA, or ISO, our hosted service may not meet your requirements. We are an independent service and do not offer on-prem deployment options. If data privacy and security are critical factors for your application, you may need to explore other options that offer these features.
Furthermore, if you are looking for a model with a specific benchmark score or named customers, our API does not provide this information. We focus on providing a reliable and uncensored text generation service without making claims about benchmark scores or customer bases. If these factors are important to you, you may need to research other providers.
Finally, if you require a free unlimited tier or specific payment methods like credit cards or PayPal, our API may not be suitable. We offer prepaid credit via crypto (USDT on TRC20 or USDC on Base) and a trial credit of $0.50 for new accounts. If your budget or payment preferences differ, you may need to consider other options that align with your needs.
Community Questions and Best Practices
Developers frequently ask about the best practices for using our uncensored API in production environments. One common question is how to handle high-volume traffic without hitting rate limits. The key is to implement efficient retry logic and monitor your token usage closely. By understanding your usage patterns, you can optimize your request strategy to stay within the 300 requests per minute limit.
Another frequent question is how to ensure consistent output quality. Adjusting parameters like temperature and top_p is important for this. Experiment with different settings to find the optimal configuration for your specific use case. Additionally, using JSON mode can help in maintaining structured and consistent output, which is beneficial for downstream processing.
Users also inquire about the best way to handle refusals. Since our model refuses requests involving sexual content with minors, it is important to design your application to handle these refusals gracefully. Log the refusals and provide appropriate feedback to the user. This helps in maintaining a good user experience even when the model decides not to generate a response.
Finally, many developers ask about the best practices for integrating with TTS pipelines. Using streaming over SSE and function calling can enhance the performance and functionality of your pipeline. By using these features, you can create a more responsive and interactive application. Always refer to the official documentation for the latest updates on features and limits.
Frequently asked questions
How do I prevent truncated output from the API?
Truncated output can occur due to hitting the max tokens limit or context window. Adjust the max tokens parameter and monitor your context window usage to ensure you stay within limits. Also, check for content filter refusals that might cause abrupt stops.
What is the best temperature setting for TTS?
A moderate temperature, such as 0.7, often provides a good balance between creativity and coherence. Experiment with different values to find the optimal setting for your specific use case. Lower temperatures produce more deterministic output, while higher values increase diversity.
How do I handle rate limits effectively?
Implement exponential backoff in your retry logic to handle 429 errors. Monitor your token usage and credit balance to avoid interruptions. Ensure you have sufficient prepaid credit and top up as needed to maintain continuous service.
Does the API support streaming for real-time applications?
Yes, the API supports streaming over SSE (Server-Sent Events). This allows for real-time feedback, which is important for applications requiring immediate responses. Use streaming to reduce latency and improve the user experience in your TTS pipeline.