EN ▾

Uncensored text API for voice pipelines

uncensoredhttps://api.xtts.cc/v1

Voice Cloning API, explained for developers

A voice cloning API requires more than just audio synthesis; it needs a reliable text layer that can generate scripts, handle context, and pass raw content to your voice model without artificial refusals. This guide explains how to integrate an uncensored LLM API to power the text generation stage of your pipeline, ensuring your cloned voices sound natural and unfiltered.

Voice Cloning API, explained for developers

Updated

The Two Parts of Voice Cloning

Modern voice cloning applications typically rely on a two-stage pipeline. The first stage is text generation, where an LLM creates the script, dialogue, or narrative that will be spoken. The second stage is audio synthesis, where a Text-to-Speech (TTS) engine converts that text into audio using a cloned voice profile.

Most developers focus heavily on the audio side, optimizing for voice similarity and latency. However, the quality of the final audio is directly dependent on the text input. If the text contains errors, awkward phrasing, or is cut off due to content filters, the audio output will suffer regardless of how advanced your TTS engine is.

The text layer acts as the brain of the operation. It handles prompt writing, script generation, and post-processing. By treating text generation as a distinct API integration, you can swap out models or improve prompt engineering without touching your audio infrastructure. This separation allows for more robust error handling and better control over the content that reaches the microphone.

Why Standard APIs Fail Voice Pipelines

Standard LLM APIs are designed for general consumer use, which often means they apply strict safety filters. These filters are useful for chatbots but problematic for voice cloning pipelines. If your cloned voice is used for adult content, creative fiction, or controversial topics, standard APIs may refuse to generate the text or alter it unexpectedly.

For example, a standard API might refuse to generate a script containing mild profanity or mature themes, even if those elements are essential for the character's voice. This results in broken audio clips or inconsistent tone. Additionally, standard APIs often truncate responses prematurely to save costs, which can cut off a sentence mid-thought, leading to awkward audio transitions.

When building a voice cloning API, you need a text provider that respects your content boundaries. This means an uncensored model that answers directly without unnecessary moralizing or filtering. The text API should act as a transparent conduit, delivering exactly what you ask for, allowing your voice model to handle the vocalization without interference from text-layer refusals.

The Cost of Content Filters

Content filters introduce hidden costs in voice cloning pipelines. When a filter triggers, the API may return an error, a partial response, or a modified script. Your application must then retry the request, consume more tokens, or handle the error gracefully. This increases latency and reduces reliability.

Moreover, filters can alter the meaning of the text. A safety filter might change "kill" to "eliminate" or soften a harsh tone, changing the emotional delivery of the voice. For voice cloning, tone is everything. If the text doesn't match the intended emotion, the audio output will feel disconnected.

Using an uncensored LLM API eliminates these surprises. You get the raw text as requested, ensuring that the voice model receives the exact content you planned. This consistency is important for maintaining the integrity of the cloned voice across different types of content, from casual conversation to dramatic monologues.

Uncensored Text for Better Voices

An uncensored text API is not about removing all rules; it's about removing arbitrary restrictions that don't affect the voice quality. Our API at https://api.xtts.cc/v1 serves an uncensored large language model designed to answer without content refusals for lawful adult use. The only hard limit is the refusal of sexual content involving minors, which is a standard legal requirement.

This approach ensures that your voice cloning pipeline can handle any script you provide. If you're generating dialogue for a video game, a podcast, or an audiobook, the text API will deliver the content as intended. The model is open-weight and runs on our own servers, tuned to provide consistent, high-quality text output.

By using an uncensored model, you gain full control over your content. You don't have to wonder if a specific word or phrase will trigger a filter. This predictability allows you to build more reliable voice applications that can handle a wider range of content types without breaking.

Technical Requirements for Text Input

When integrating a text API into a voice cloning pipeline, you need to consider context window size and token limits. Our API supports a context window of 100,000 tokens, allowing for long scripts or complex prompt histories. There is no separate output cap per request, which is sufficient for most voice generation tasks.

The API is OpenAI-compatible, meaning you can use the official SDKs and client libraries with minimal changes. Simply update the base URL to https://api.xtts.cc/v1 and provide your API key. This compatibility allows you to use familiar tools and workflows, reducing the learning curve for developers.

We charge $0.15 per 1M input tokens and $0.50 per 1M output tokens. Credit is prepaid and never expires. Errors and refusals are free, so you only pay for the text that is actually generated. This pricing model is transparent and predictable, making it easy to estimate costs for your voice cloning application.

Streaming Text for Real-Time TTS

For real-time voice applications, streaming text is essential. Our API supports streaming via Server-Sent Events (SSE), allowing you to receive text tokens as they are generated. This reduces latency and provides a smoother user experience.

Streaming also allows you to start synthesizing audio while the text is still being generated. This parallel processing can significantly reduce the total time to produce audio clips. The last chunk of the stream includes token usage information, so you can track costs in real-time.

To implement streaming, use the stream parameter in your API requests. The SDKs will handle the event parsing, delivering tokens to your application as they arrive. This feature is important for applications where latency matters, such as interactive voice assistants or live narration.

Function Calling for Script Generation

Function calling is a powerful feature for automating script generation and post-processing. Our API supports function calling, allowing you to define specific tasks for the model, such as formatting text, extracting entities, or translating scripts.

For example, you can define a function to clean up text for TTS, removing punctuation that might cause awkward pauses. The model will then call this function and return the formatted text. This ensures that the text is optimized for voice synthesis, improving the naturalness of the audio output.

Function calling also allows for more structured outputs. You can request the model to return JSON, which can be easily parsed by your application. This is useful for generating metadata, such as emotion tags or phonetic hints, that can be passed to the TTS engine.

Choosing the Right Text Provider

When selecting a text provider for your voice cloning API, consider the following factors:

  • Uncensored Model: Ensure the model does not refuse content based on common safety filters.
  • OpenAI Compatibility: Choose an API that works with existing SDKs and tools.
  • Context Window: A large context window allows for longer scripts and more complex prompts.
  • Pricing: Look for transparent, usage-based pricing without hidden fees.

Our API meets all these criteria. It is an uncensored model with a 100,000 token context window, compatible with OpenAI SDKs, and priced at $0.15 per 1M input tokens and $0.50 per 1M output tokens. Credit is topped up by crypto (USDT on TRC20, USDC on Base), with no card needed for the trial.

Conclusion: Text Quality Defines Voice Quality

The quality of your voice cloning application is ultimately defined by the quality of the text input. A reliable text API ensures that your scripts are accurate, complete, and free from arbitrary restrictions. By choosing an uncensored, OpenAI-compatible API, you can build voice pipelines that are reliable, scalable, and true to your content.

Start by integrating our API into your pipeline. Generate scripts, format text, and pass the output to your TTS engine. You'll notice a significant improvement in the consistency and naturalness of your cloned voices. The text layer is the foundation of your voice cloning API, and investing in the right provider will pay off in the quality of your final audio.

Questions and answers

What is the base URL for the Xtts API?

The base URL is https://api.xtts.cc/v1. You can use this URL with any OpenAI-compatible client by setting the base_url parameter and providing your API key.

Does the API have any content restrictions?

The model is uncensored and does not refuse lawful adult, fictional, or controversial topics. The only hard limit is the refusal of sexual content involving minors.

How much does the API cost?

The API costs $0.15 per 1M input tokens and $0.50 per 1M output tokens. Credit is prepaid and never expires. Errors and refusals are free.

How do I top up my credit?

Credit is topped up by crypto (USDT on TRC20, USDC on Base). You can top up any whole amount from $20 to $500, with bonuses for larger amounts.

Your key is one form away

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