EN ▾

Uncensored text API for voice pipelines

uncensoredhttps://api.xtts.cc/v1

Quickstart for Xtts pipelines

Integrate our uncensored text API into your voice cloning pipeline with this quickstart guide. Learn to generate scripts, captions, and raw text responses using standard OpenAI-compatible endpoints.

Authentication & Base URL

Start by navigating to the Get API key page and signing in with Google or an email password. You will receive a unique API key immediately. Use the base URL https://api.xtts.cc/v1 for all requests. This URL is compatible with official OpenAI SDKs and any client that supports the OpenAI chat-completions format.

Include your key in the Authorization header as a bearer token. The model identifier you must send is uncensored. This open-weight model is hosted on our servers and is tuned to answer without content refusals for lawful adult use, ensuring your voice pipeline receives the raw text it needs.

Generate Uncensored Text

Send a POST request to /v1/chat/completions with your system and user prompts. The API returns structured JSON containing the generated text. This endpoint is designed for prompt writing, script generation, and post-processing tasks in your voice cloning workflow.

The request body includes the model name, your message history, and optional parameters like temperature or top_p. You can control the output length with the max_tokens parameter. If you do not set max_tokens, the response can run to the end of the window.

curl https://api.xtts.cc/v1/chat/completions \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "uncensored",
    "messages": [{"role": "user", "content": "Write a blunt product review of a cheap VPN."}]
  }'

Python SDK Integration

Use the official OpenAI Python SDK to interact with our API. Set the base_url to our endpoint and provide your API key. This approach allows you to leverage existing code structures while benefiting from our uncensored model's behavior.

Create a client instance with the base URL and then call chat.completions.create. Pass the uncensored model ID and your messages. The response object contains the generated text in content. This method is ideal for batch processing scripts or integrating text generation into larger Python applications.

from openai import OpenAI

client = OpenAI(base_url="https://api.xtts.cc/v1", api_key="YOUR_KEY")

resp = client.chat.completions.create(
    model="uncensored",
    messages=[{"role": "user", "content": "Summarise this thread without softening it."}],
)
print(resp.choices[0].message.content)

Node SDK Integration

For JavaScript environments, use the OpenAI Node SDK. Configure the client with our base URL and API key. This setup enables you to generate text directly in your web or server-side applications.

Call the chat completions endpoint with the uncensored model. The response provides the generated text, which you can then pass to your voice synthesis engine. This integration is suitable for real-time text generation in web apps or backend services that prepare scripts for voice cloning.

import OpenAI from "openai";

const client = new OpenAI({ baseURL: "https://api.xtts.cc/v1", apiKey: process.env.API_KEY });

const resp = await client.chat.completions.create({
  model: "uncensored",
  messages: [{ role: "user", content: "Draft a villain monologue for my game." }],
});
console.log(resp.choices[0].message.content);

Streaming Responses

Enable streaming by setting stream to true in your request. The API returns Server-Sent Events (SSE) for each generated token. This feature is useful for real-time text display or progressive voice synthesis preparation.

Each event chunk contains partial text. The final chunk includes usage statistics, such as token counts. Streaming ensures your application can process text as it is generated, reducing perceived latency for users. Handle the stream events to accumulate the complete response.

stream = client.chat.completions.create(
    model="uncensored",
    messages=[{"role": "user", "content": "Tell the story in second person."}],
    stream=True,
)
for chunk in stream:
    if chunk.choices and chunk.choices[0].delta.content:
        print(chunk.choices[0].delta.content, end="", flush=True)

Rate Limits & Parameters

Each API key is limited to 300 requests per minute and 8 concurrent requests. The request body must not exceed 8 MB. If you send an invalid key, you will receive a 401 error. If your prepaid credit is exhausted, you will receive a 402 error. Exceeding the rate limit results in a 429 error.

The context window supports 100,000 tokens total, including both the prompt and the completion. There is no separate output cap, and you can specify a lower max_tokens if you want a shorter reply. Errors and refusals do not consume your prepaid credit. Support for function calling and JSON mode is available for structured data extraction.

Under the hood: specs

One table with every limit, feature and price that applies to your key.

FeatureSupport
CompatibilityOpenAI-compatible: any OpenAI SDK or client works — change the base URL and the key
EndpointsPOST /v1/chat/completions · GET /v1/models
API keyBearer token in the Authorization header
Model IDuncensored
Base URLhttps://api.xtts.cc/v1
Tools / tool callsSupported: tools + tool_choice, tool_calls in the reply (streamed too), tool results as role: tool messages
Completion lengthprompt + completion fit within 100,000 tokens; max_tokens optional, no separate output cap
Other parameterstemperature, top_p, stop, seed and the two penalties are passed through
JSON modeJSON object mode via response_format json_object
Context window100,000 tokens, input and output combined
SSE streamingYes — server-sent events; the last chunk carries token usage
Request sizeup to 8 MB per request
Parallel requestsup to 8 in parallel per key
Response headersX-Request-Id, X-Balance-USD, X-RateLimit-Limit-Requests, X-RateLimit-Limit-Concurrency
Rate limit300 requests per minute per key
Trial credit$0.50 for 7 days, no card · Trial key: 2 parallel requests, 60 req/min; full limits (8 and 300) after first top-up
Token pricesinput $0.15 / 1M tokens, output $0.50 / 1M tokens
Billingpay as you go from prepaid credit; nothing is charged for failed or refused requests
PaymentUSDT (TRC20) or USDC (Base), any whole amount from $20 to $500
Volume bonus+5% from $50, +10% from $100, +15% from $200
Subscriptionpaid credit never expires, no subscription
Sign-inGoogle or e-mail and password
Keysone active key per account; a new key replaces the old one
Contentuncensored for adults; the only hard rule: no sexual content involving minors

When a request fails

The type field is stable, the message is for humans. Errors cost nothing.

HTTPTypeWhat to do
400bad_requestinvalid JSON, empty messages, bad parameter, or a prompt longer than the window — fix and resend
401missing_key · invalid_key · key_revokedno key, wrong key, or a key replaced by a newer one
402no_creditout of credit; add credit and retry
403content_blockedsexual content involving minors — refused, not billed
404not_foundunknown endpoint
413request_too_largebody over 8 MB
429rate_limited · concurrencyslow down: rate or parallel limit reached
503upstream_busymodel busy — retry in a few seconds

Questions and answers

How do I top up my prepaid credit?

You can top up by crypto (USDT on TRC20, USDC on Base). Accepted amounts range from $20 to $500. You receive a 5% bonus for top-ups of $50 or more, and a 10% bonus for $100 or more. Credit never expires.

Does the API generate audio or video?

No, this API is strictly for text generation. It provides an uncensored text response that you can feed into your own voice synthesis or video pipelines. It does not produce audio, images, or video files directly.

What is the trial offer?

New users get $0.50 of trial credit, one per person, valid for 7 days. Claim this credit with one click on your API key page. No credit card is required to sign up. This allows you to test the API before purchasing prepaid credit.

Your key is one form away

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