EN ▾

Voice Cloning Scripts API Quickstart Guide

Use this uncensored chat-completions API to generate scripts and extract metadata for your voice pipeline without content filters. Integrate via standard OpenAI-compatible endpoints to power transcription post-processing and script generation.

Base URLhttps://api.voicecloningapi.com/v1
Modeluncensored

Authentication & Base URL

Your API key authenticates all requests to the base URL https://api.voicecloningapi.com/v1. Pass this key in the Authorization header as a Bearer token. You can generate or regenerate a key immediately after signing up on the Get API key page. Each account is limited to one active key at a time; regenerating invalidates the previous one. Ensure your client library points to this base URL to avoid routing errors.

Sending Your First Request

The primary endpoint is POST /v1/chat/completions. Send your prompt and model identifier to generate text. The model ID is uncensored. This endpoint handles standard chat formats, not legacy completion endpoints. Below is a minimal curl example to test connectivity.

curl https://api.voicecloningapi.com/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."}]
  }'

This request returns a JSON object containing the generated text. Use this to verify your key and base URL configuration before integrating into your voice cloning workflow.

Python SDK Integration

Use the official OpenAI Python SDK for easy integration. Configure the base URL and API key to route requests to our servers. The model parameter must be set to uncensored. This approach is ideal for batch script generation or metadata extraction tasks within your voice pipeline.

from openai import OpenAI

client = OpenAI(base_url="https://api.voicecloningapi.com/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)

Ensure you pass the messages array correctly. The API supports standard chat messages, allowing you to maintain context if needed, though our model is primarily stateless per request unless you manage history in your application.

Node SDK Integration

For JavaScript environments, use the OpenAI Node SDK. Set the apiKey and baseURL properties. Specify model: 'uncensored' in your request configuration. This method is suitable for real-time web applications or server-side Node.js services processing voice scripts.

import OpenAI from "openai";

const client = new OpenAI({ baseURL: "https://api.voicecloningapi.com/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);

Handle the response asynchronously. The API returns structured JSON, making it easy to parse the generated content for downstream TTS or voice cloning engines.

Streaming Responses for Real-Time Scripting

Enable streaming by setting stream: true in your request. The API returns Server-Sent Events (SSE) for real-time token delivery. This is useful for low-latency voice scripts where you want to display or process text as it generates. Monitor for the data: [DONE] event to know when the response is complete.

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)

Stream handling reduces perceived latency for your users. Ensure your client library supports SSE parsing to avoid blocking the main thread during generation.

Rate Limits, Errors, and Context

Each API key is limited to 300 requests per minute. The maximum request body size is 8 MB. Your context window is 100,000 tokens, including both prompt and completion. Common errors include 401 (invalid key), 402 (insufficient credit), and 429 (rate limit exceeded). Handle these by checking your balance or implementing exponential backoff. Note that the model does not refuse adult content, except for sexual content involving minors, which is always blocked.

Under the hood: specs

If your tool speaks the OpenAI API, these are the details that matter.

ParameterDetails
ProtocolOpenAI Chat Completions schema; official openai SDKs work unchanged
API keyAuthorization: Bearer YOUR_KEY
MethodsPOST /v1/chat/completions · GET /v1/models
Model IDuncensored
Base URLhttps://api.voicecloningapi.com/v1
Structured outputresponse_format: {"type": "json_object"}
Context window100,000 tokens, input and output combined
StreamingSupported (stream: true), usage included at the end
Sampling parameterstemperature, top_p, stop, seed, presence_penalty, frequency_penalty
Tools / tool callsYes — tools, tool_choice; replies carry tool_calls, also when streaming; send results back as role: tool
Completion lengthprompt + completion fit within 100,000 tokens; max_tokens optional, no separate output cap
Requests per minute300 requests per minute per key
Parallel requestsup to 8 in parallel per key
Response headersX-Request-Id, X-Balance-USD, X-RateLimit-Limit-Requests, X-RateLimit-Limit-Concurrency
Request sizeup to 8 MB per request
Billingprepaid credit, charged by real token usage; errors and refusals are free
Subscriptionno monthly fee; paid credit does not expire
Bonus credit+5% from $50, +10% from $100, +15% from $200
Free trial$0.50 of credit valid 7 days, no card needed · Trial key: 2 parallel requests, 60 req/min; full limits (8 and 300) after first top-up
Token prices$0.15 per 1M input tokens · $0.50 per 1M output tokens
Top-upcrypto: USDT on TRON or USDC on Base, $20–$500, any whole sum
Key managementone key per account, regenerate any time (the old one stops working)
Accountsign in with Google or with e-mail + password
Contentuncensored for adults; the only hard rule: no sexual content involving minors

Error codes

Errors come back as JSON with a stable type; failed and refused requests are not billed.

CodeTypeMeaning
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_creditbalance is empty — top up, requests resume at once
403content_blockedsexual content involving minors — refused, not billed
404not_foundonly /v1/chat/completions and /v1/models exist
413request_too_largebody over 8 MB
429rate_limited · concurrencyover 300/min or 8 parallel — back off and retry
503upstream_busymodel busy — retry in a few seconds

Questions and answers

Is this the official OpenAI API?

No. This is an independent service running an open-weight uncensored model. It is OpenAI-compatible, meaning you can use the same SDKs and endpoints, but it is not GPT-4 or any other vendor's model. Check the vendor's documentation for their specific limits and pricing.

What is the context window size?

The model supports a 100,000 token context window. This includes both the input prompt and the generated output. Plan your token usage accordingly to avoid truncation.

Does the API support function calling?

Yes. The POST /v1/chat/completions endpoint supports tool/function calling. You can define tools in your request and the model will return structured JSON for metadata extraction or script generation.

Your key is one form away

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