TTS API Base URL: What It Is and What to Enter
A base URL is the shared front part of every endpoint address. This page explains what to put there for this service, which is a text LLM API and not a speech endpoint, and how to set it in common tools.
Updated

Key points
- The base URL for this API is https://api.ttsapihub.com/v1; paths such as /chat/completions are added after it.
- Despite the site name, the endpoint produces text only. There is no speech or audio endpoint.
- Most OpenAI-compatible tools only need three values: base URL, API key and the model ID uncensored.
- Two common mistakes are doubling /v1 and pasting the full /chat/completions path into a base URL field.
The base URL, and one thing to know first
If you landed here by searching for a tts api base url, check one detail before you copy anything: the service behind this site is a text language model API, not a speech synthesizer. The base URL is https://api.ttsapihub.com/v1, and it exposes POST /v1/chat/completions and GET /v1/models. There is no /audio/speech route, no voice list and no audio output.
That matters because many tools label their settings generically. A field called base URL in a client works the same way whether the server behind it answers with text or sound. If your goal is turning text into audio, this endpoint will not do it. If your goal is to generate the text that a speech tool will later read, for scripts, dialogue or narration drafts, it fits well. The site's TTS pipeline checklist is the place to look when you are planning that kind of workflow, and the quickstart docs list every request parameter.
The rest of this page applies to any OpenAI-compatible client, so it is useful even if you are only here to learn how base URLs work.
What a base URL actually is
An API address has two halves. The first half identifies the service and the version of its interface. The second half names the action. The client library glues them together for you. With the OpenAI SDKs the pieces look like this:
| Part | Value |
|---|---|
| Base URL | https://api.ttsapihub.com/v1 |
| Path added by the SDK for chat | /chat/completions |
| Full address that is called | https://api.ttsapihub.com/v1/chat/completions |
| Path for the model list | /models |
Because the SDK appends the path, you give it only the first half. That is the whole idea behind switching providers with a one-line change: the request format is shared, so the only thing that has to move is where requests are sent. The key changes too, since each service issues its own. And the model name changes, because each service names its own models. For this API the model ID is uncensored.
Two small details save time. The version segment, /v1, belongs to the base URL because it marks the interface generation; a future incompatible interface would live under a different version, and your code would not change until you chose to move. And a trailing slash on the base URL is tolerated by most SDKs, but it is safer to leave it off so that joined paths never contain a double slash.
Authentication is a standard bearer header: Authorization: Bearer YOUR_KEY. SDKs build that header from the key you pass in, so you rarely write it yourself except in curl.
Setting the base URL in code
Python
The official openai package takes a base_url argument. This is a full working call:
from openai import OpenAI
client = OpenAI(
base_url="https://api.ttsapihub.com/v1",
api_key="YOUR_KEY",
)
resp = client.chat.completions.create(
model="uncensored",
messages=[{"role": "user", "content": "Write a two-line scene opening."}],
)
print(resp.choices[0].message.content)Node
import OpenAI from "openai";
const client = new OpenAI({
baseURL: "https://api.ttsapihub.com/v1",
apiKey: process.env.API_KEY,
});
const resp = await client.chat.completions.create({
model: "uncensored",
messages: [{ role: "user", content: "Write a two-line scene opening." }],
});
console.log(resp.choices[0].message.content);curl
With curl you write the whole address yourself, so the path is included:
curl https://api.ttsapihub.com/v1/chat/completions \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{"model": "uncensored", "messages": [{"role": "user", "content": "Say hello."}]}'Environment variables
Recent versions of the official OpenAI SDKs read OPENAI_BASE_URL and OPENAI_API_KEY from the environment when you do not pass them in code. That is handy when you want to point existing software at a new endpoint without editing it. Set them in your shell or your process manager, then run the program as usual. Check your SDK version's documentation if it does not pick them up.
Setting it in editors and apps
Tools that accept a custom OpenAI endpoint ask for the same three values. Names differ, so look for wording like the following:
- Cursor: in the model settings there is an option to override the OpenAI base URL. Paste
https://api.ttsapihub.com/v1, add your key, and adduncensoredas a custom model name. Interface labels change between Cursor versions, so treat these names as a guide. - SillyTavern: choose Chat Completion, then the Custom (OpenAI-compatible) source, and fill in the endpoint, key and model.
- Open WebUI and similar chat front ends: add an OpenAI-type connection with the base URL and key.
- Your own scripts: any HTTP client works, since the interface is plain JSON over HTTPS.
Some tools check the connection by calling GET /v1/models. This API supports that route, so the check passes. A few tools only let you pick from a fixed list; if yours does, look for a custom or manual model field rather than the dropdown.
Remember what the tool is for. An editor like Cursor will send code questions to a general chat model, which works. But features that depend on special endpoints, such as embeddings for code search, are not available here, because embeddings are not offered.
Mistakes that cause most base URL errors
Almost every failed first connection comes from one of these.
- Doubling the version. The base URL already ends in
/v1. If you add another, the address becomes/v1/v1/chat/completionsand the server answers with a not-found error. - Pasting the full path. A base URL field wants
https://api.ttsapihub.com/v1, nothttps://api.ttsapihub.com/v1/chat/completions. The SDK would append the path a second time. - Using the website address. The site you read is not the API host. Requests go to the
api.host shown above. - Calling a speech route. Paths like
/audio/speechdo not exist here and return an error. - Wrong or missing model name. Always send
uncensoredin lowercase. - Key problems. A stray space or a missing
Bearerprefix in a hand-written header gives an authentication error.
To tell a URL problem from a key problem, request the model list. A correct URL and a wrong key gives an authentication error. A wrong URL gives not found, a DNS error or an HTML page instead of JSON.
curl https://api.ttsapihub.com/v1/models -H "Authorization: Bearer $API_KEY"
# then a minimal chat call with the model ID "uncensored":
curl https://api.ttsapihub.com/v1/chat/completions -H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{"model":"uncensored","messages":[{"role":"user","content":"ping"}],"max_tokens":5}'Get a key and what it costs
You need a key before any of this works. Sign up with Google or with email and password on the API key page, then claim the $0.50 trial credit with one click. It is valid for 7 days, one claim per person, and needs no card. The trial key allows 2 concurrent requests and 60 requests per minute, while a full key allows 8 concurrent and 300 per minute.
Pricing is $0.15 per 1M input tokens and $0.50 per 1M output tokens, paid from prepaid credit with no subscription. A request with 2,000 input tokens and 500 output tokens costs $0.0003 plus $0.00025, so $0.00055. Top-ups run from $20 to $500 with bonuses from $50, and you can pay by card (Visa, Mastercard, Apple Pay, Google Pay) or crypto (USDT on TRC20, USDC on Base). The pricing page has the full table. Prompts are not used for training, and the model is for lawful adult use only, with no sexual content involving minors.
More guides
Questions and answers
What is the base URL for this API?
It is https://api.ttsapihub.com/v1. Add paths such as /chat/completions after it, or let your SDK add them.
Can I use this endpoint for text to speech?
No. It returns text only, with no audio, image or video generation. You can use it to write the text that another tool then turns into speech.
Do I add /chat/completions to the base URL in an SDK?
No. SDKs append the path themselves. Only raw HTTP clients such as curl need the full address.
Which model name should I send?
Send uncensored. You can confirm what the server lists with GET /v1/models.
Why does my tool say not found after I set the URL?
The most common causes are a doubled /v1, a pasted full path, or the website address used instead of the api. host.
Your key is one form away
Create an account, copy the key, change the base URL. That is the whole setup.