EN ▾
Get API key

OpenAI TTS API Key: Get One for a Text API

An openai tts api key normally gives access to speech generation at OpenAI. The key you get here gives access to something narrower: an OpenAI-compatible text API for writing the scripts and dialogue that a TTS engine reads aloud.

Updated

A glowing key above a circuit path leading to a speaker, representing an API key for a voice text pipeline

Key points

  • The key works with any OpenAI SDK once you point it at https://api.f5tts.cc/v1.
  • It authorizes text chat completions only; there is no audio endpoint.
  • New users can claim $0.50 trial credit with one click, valid for 7 days, no card.
  • Keep the key in an environment variable and watch the X-Balance-USD response header.

Get a key in four steps

  1. Open the API key page and sign up with Google, or with an email and password.
  2. On the key page, click the trial button to claim $0.50 of credit. It is one per person, lasts 7 days and needs no card.
  3. Create or copy your key and store it somewhere private.
  4. Run a test request (code below) to confirm it works.

The trial key is limited to 2 concurrent requests and 60 requests per minute. That is plenty for testing a script-writing prompt. A full key, available once you add credit, allows 8 concurrent requests and 300 requests per minute.

What the key does and does not cover

One key, one model: the model ID is uncensored. It is an open-weight text model run by an independent provider, and the key gives access to POST /v1/chat/completions and GET /v1/models. That is the whole surface.

There is no speech endpoint, no image or video generation, no embeddings and no fine-tuning. If you arrived expecting an audio file back, the key will not produce one. What it does produce is the text half of a voice pipeline: narration, dialogue, ad reads, and cleaned-up lines ready for a speech engine. See the text layer for voice generation for how people wire the two together.

It is also not the official API of OpenAI or any other vendor. The key is issued by this site and works only here.

Use the key in Python

Store the key in an environment variable so it never lands in source control. The SDK sends it as Authorization: Bearer <key>.

import os
from openai import OpenAI

client = OpenAI(
    base_url="https://api.f5tts.cc/v1",
    api_key=os.environ["F5TTS_API_KEY"],
)

models = client.models.list()
print([m.id for m in models.data])

r = client.chat.completions.create(
    model="uncensored",
    messages=[{"role": "user", "content": "Reply with the word ready."}],
    max_tokens=5,
)
print(r.choices[0].message.content)

The first call lists models, which proves the key is accepted. The second makes a tiny completion. If both print something sensible, you are done with setup.

Test the key with curl and Node

Curl is the quickest check when you suspect the SDK or your environment.

export F5TTS_API_KEY="paste-your-key-here"

curl https://api.f5tts.cc/v1/models \
  -H "Authorization: Bearer $F5TTS_API_KEY"

# model id to use in requests: uncensored
curl https://api.f5tts.cc/v1/chat/completions \
  -H "Authorization: Bearer $F5TTS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":"uncensored","messages":[{"role":"user","content":"ping"}]}'

In Node, the same pattern applies. Catch errors and print the status and the error code, because that tells you which of the common failures you hit.

import OpenAI from "openai";

// base URL: https://api.f5tts.cc/v1
const client = new OpenAI({
  baseURL: "https://api.f5tts.cc/v1",
  apiKey: process.env.F5TTS_API_KEY,
});

try {
  const r = await client.chat.completions.create({
    model: "uncensored",
    messages: [{ role: "user", content: "ping" }],
  });
  console.log(r.choices[0].message.content);
} catch (e) {
  console.error(e.status, e.error?.code);
}

Fix the usual key errors

401 or an authentication error

The key is missing, truncated or has a stray space or newline. Re-copy it, and check that your shell did not expand a character. Make sure the header reads Bearer followed by one space and the key.

The SDK talks to the wrong server

If you forget the base URL, the SDK sends your key to the default OpenAI host, where it is rejected. Set base_url (Python) or baseURL (Node) to https://api.f5tts.cc/v1. Some tools read an environment variable such as OPENAI_BASE_URL instead; set that if the tool has no field for it.

HTTP 429

The error code tells you the cause. rate_limited means too many requests per minute. concurrency means too many at once; a streamed request holds its slot until the stream ends. A 429 with a Retry-After: 5 header means temporary overload: wait five seconds and retry.

Model not found

Use uncensored exactly. Names from other providers will not work here.

Keep the key safe and watch the balance

Never put the key in front-end code, a public repository or a client-side app. Anyone who finds it can spend your credit. Call the API from a server you control, and rotate the key if it leaks.

Each response carries an X-Balance-USD header with your remaining credit, plus X-Request-Id, X-RateLimit-Limit-Requests and X-RateLimit-Limit-Concurrency. Log the request ID when you contact support, and alert yourself when the balance drops under a threshold you choose.

Prompts are not used for training. Failed or refused requests are not charged, and credit never expires.

Using the key in apps and tools

Many tools that talk to OpenAI let you override the endpoint. Look for fields named base URL, API host, custom endpoint or OpenAI-compatible provider. Enter three values: the URL https://api.f5tts.cc/v1, your key, and the model name uncensored. Leave the path off; the client adds /chat/completions itself.

If a tool insists on choosing from a fixed model list, it usually has a free-text option for custom models. If it does not, it cannot talk to this API. Check the tool's own documentation for the exact field names, since they differ.

A script-writing setup for voice work often looks like this: a small server that receives a brief, calls the API with a system prompt tuned for speakable text, and hands the result to your speech engine. The key lives only on that server. The quickstart has the request format, including streaming, tool calls and JSON mode.

Separate keys per environment

If you run a staging and a production service, keep their configuration separate and name your variables clearly, for example F5TTS_API_KEY_STAGING. That way a test loop cannot drain the balance you want for real jobs. Because credit is prepaid and shared across usage, a runaway loop costs real money; cap retries and set a ceiling on parallel workers (8 on a full key).

Adding credit after the trial

Top up any whole amount from $20 to $500, paying by crypto (USDT on TRC20, USDC on Base). Bonuses apply: +5% from $50, +10% from $100, +15% from $200. So $100 gives you $110 of credit and $200 gives you $230. Prices are $0.15 per 1M input tokens and $0.50 per 1M output tokens; the pricing page has details and the quickstart covers the request format.

Questions and answers

Is the key free?

Creating an account is free, and new users can claim $0.50 of trial credit with one click, valid for 7 days. After that you add prepaid credit from $20.

Can this key generate speech?

No. It only authorizes text chat completions. Use it to write scripts, then send them to a speech engine.

Do I need a card for the trial?

No. The trial credit needs no card. Sign-up is with Google, or with email and password.

Can I use the key in an app that supports a custom OpenAI endpoint?

Yes. Enter https://api.f5tts.cc/v1 as the base URL, your key as the API key and uncensored as the model name.

Your key is one form away

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