Frequently asked questions
How do I get my API key?
Sign up on the /get-api-key/ page using Google or an email and password. The dashboard displays your single active API key, current balance, and usage statistics. You can issue a new key at any time, which immediately invalidates the previous one.
What is the base URL for the API?
The API base URL is https://api.tig168.cc/v1. Send POST requests to https://api.tig168.cc/v1/audio/speech for speech synthesis. Other endpoints include GET /v1/voices and GET /v1/models for configuration details.
Can I use the OpenAI Python SDK?
Yes. The request shape matches the OpenAI speech endpoint. Configure your OpenAI SDK by changing the base_url to https://api.tig168.cc/v1 and using your Narrative Metrics API key for authentication.
What is the maximum input length?
Each request supports up to 4096 characters of text. For longer texts, split the input into parts within this limit and join the resulting audio files. Spaces and punctuation count toward the character limit.
How do I specify a voice?
Include a voice parameter in your request body. Available presets are aria, nova, luna, sage, felix, milo, atlas, and orion. You can also optionally specify a language ISO code to guide synthesis.
What are the available audio formats?
You can request audio in mp3, wav, opus, flac, or pcm formats. Set the response_format field in your JSON request body to your preferred format. All formats include an inaudible synthetic watermark.
How do I handle rate limits?
The limit is 60 requests per minute per key (10 before the first top-up). Requests process sequentially, so under load, requests may queue. Failed requests are free, but the rate limit applies to requests per minute.
Is there a webhook for completion?
No. The API returns the audio file directly in the response. There are no webhooks, streaming endpoints, or WebSocket connections for real-time partial audio delivery. You must handle the response synchronously.
Can I stream audio in real-time?
No. The API does not support streaming or real-time partial audio. You receive the complete audio file in the response after synthesis finishes. Short phrases may take a few seconds to generate.
Do I need to install a specific library?
No. You can use the official OpenAI SDKs by adjusting the base URL, or use plain HTTP requests. There is no proprietary library or mobile SDK required. Any HTTP client works.
How do I calculate character counts?
Count every character, including spaces and punctuation. The price is $0.01 per 1,000 characters. Failed requests are free, so you only pay for successfully synthesized audio files.
What happens if the API is down?
There is no SLA or uptime guarantee. If synthesis fails, the charge is returned in full. Requests may also queue under load, delaying generation. Support is available via email only.
Can I use multiple keys at once?
Yes. Each account has one active key. You can issue a new key at any time, which immediately invalidates the previous one.
How do I test the API for free?
Sign in with Google to receive $0.50 of trial credit (approx. 50,000 characters) valid for 7 days. Email accounts start without credit. Top-ups via USDT (TRC-20) are credited automatically within minutes.
First request
curl
curl https://api.tig168.cc/v1/audio/speech \
-H "Authorization: Bearer $TTS_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model":"tts-1","voice":"aria","input":"Hello from the API.","response_format":"mp3"}' \
--output hello.mp3Python (openai)
from openai import OpenAI
client = OpenAI(base_url="https://api.tig168.cc/v1", api_key="tts-...")
with client.audio.speech.with_streaming_response.create(
model="tts-1", voice="nova", input="Hello from Python.", response_format="mp3"
) as response:
response.stream_to_file("hello.mp3")Node.js (openai)
import OpenAI from "openai";
import fs from "node:fs";
const client = new OpenAI({ baseURL: "https://api.tig168.cc/v1", apiKey: process.env.TTS_API_KEY });
const res = await client.audio.speech.create({ model: "tts-1", voice: "milo", input: "Hello from Node.js." });
fs.writeFileSync("hello.mp3", Buffer.from(await res.arrayBuffer()));| voice | |
|---|---|
aria | female |
nova | female |
luna | female |
sage | female |
felix | male |
milo | male |
atlas | male |
orion | male |
| language | |
|---|---|
ar | العربية |
zh | 中文 |
da | Dansk |
nl | Nederlands |
en | English |
fi | Suomi |
fr | Français |
de | Deutsch |
el | Ελληνικά |
he | עברית |
hi | हिन्दी |
it | Italiano |
ja | 日本語 |
ko | 한국어 |
ms | Bahasa Melayu |
no | Norsk |
pl | Polski |
pt | Português |
ru | Русский |
es | Español |
sw | Kiswahili |
sv | Svenska |
tr | Türkçe |
Authentication and Keys
Access the API by generating a key on the /get-api-key/ page. Accounts can be created via Google sign-in or email. The dashboard displays your active key, balance, and usage statistics, allowing you to manage your credentials directly within the interface.
Generate key on /get-api-key/ page
Visit the /get-api-key/ page to create your account. You can sign up using Google or provide an email and password. Once logged in, the page displays your unique API key, current balance, and character usage data, providing immediate access to your resources.
- Google sign-in or email/password registration
- View key, balance, and usage stats instantly
Use Bearer token in Authorization header
Include your key in the HTTP header as a Bearer token. The format is Authorization: Bearer tts-.... This header authenticates every request to the /v1/audio/speech endpoint, ensuring that usage is correctly billed to your account.
- Header format:
Authorization: Bearer tts-... - Required for all API requests
One active key per account
Each account maintains a single active API key. You can issue a new key at any time; the previous key stops working immediately. This ensures tight control over access, allowing you to revoke access instantly without waiting for token expiration.
Endpoint Structure
Interact with the Narrative Metrics API through three primary endpoints. The core generation endpoint accepts text and parameters to produce audio, while the metadata endpoints provide the necessary context for voice selection and model configuration without consuming character credits.
POST /v1/audio/speech for generation
Send a JSON payload to this endpoint to receive an audio file. The request must include the model (tts-1 or tts-1-hd), input text (max 4096 characters), and voice preset. The API returns the audio data directly in the response body, formatted according to your response_format specification.
GET /v1/voices for voice list
Retrieve the complete list of available voices, their associated languages, and supported formats. This endpoint allows you to verify which of the eight presets (e.g., aria, felix, atlas) are available and confirm language support before making a generation request. It also displays the standard price of $10 per 1 million characters.
GET /v1/models for model info
Fetch details about the underlying TTS models. This endpoint confirms the technical specifications for tts-1 and tts-1-hd, ensuring your application selects the correct engine for your quality and latency requirements. Use this data to dynamically adjust your UI or backend logic based on available model capabilities.
Request Parameters
The API accepts two model variants, tts-1 and tts-1-hd, which utilize the same underlying engine and pricing structure. You select the model based on your specific quality or latency requirements, though both deliver consistent character-based billing.
Text input is strictly limited to 4,096 characters per request. Longer content must be split programmatically into chunks and joined afterward. Each request processes sequentially, so under load, generation may queue; expect roughly real-time output speeds for long texts.
Model: tts-1 or tts-1-hd
Both models use identical pricing at $10 per million characters. Choose tts-1 for standard efficiency or tts-1-hd for enhanced fidelity. Both models use the same engine and price, allowing you to swap models without changing your integration logic.
- Same engine and price
- Identical pricing structure
- Interchangeable integration
Input: text up to 4096 characters
Send your script as the input field, capped at 4,096 characters. Spaces and punctuation count toward this limit. For audiobooks, split chapters into segments and concatenate the resulting audio files to reconstruct the full narrative.
Requests are processed sequentially. If you send multiple requests simultaneously, they may queue. Short phrases take a few seconds to generate, while longer texts approximate real-time speed (approx. 25 characters per second).
- Max 4096 characters
- Spaces count as characters
- Split and join for long texts
Voice: select from 8 presets
Select one of eight voices, such as aria for warm narration or atlas for neutral news delivery. Any voice can speak any of the 23 supported languages. If the language parameter is omitted, the system guesses the language from the script, defaulting to English for Latin text.
Set the voice parameter to your chosen preset. You can also specify a speed between 0.25 and 4.0 to adjust pacing. Ensure the language code matches your text if it is not English, as the auto-detection may misinterpret non-English Latin scripts.
- 8 voice presets
- Supports 23 languages
- Adjustable speed 0.25–4.0
Response Formats
Select the output format that aligns with your specific production workflow. The API supports MP3, WAV, FLAC, OPUS, and PCM, allowing you to choose between compressed efficiency and uncompressed fidelity without post-processing conversions.
MP3 for web compatibility
MP3 is the standard for web delivery and most video editing software. It offers a compact file size with acceptable quality for voice-overs and audiobook samples, making it ideal for rapid integration into digital publishing pipelines.
WAV for high-quality editing
WAV provides uncompressed audio, preserving every detail of the synthesized voice. This format is preferred for professional audio editing, mixing, or mastering stages where bit-perfect fidelity is required before final compression.
FLAC for lossless archival
FLAC delivers lossless compression, retaining 100% of the audio data in a smaller file than WAV. Use this format for long-form audiobook archives where storage space matters but quality degradation is unacceptable.
OpenAI SDK Integration
Narrative Metrics’ API mirrors the OpenAI speech endpoint structure, allowing you to reuse existing codebases with minimal friction. By adjusting the base URL, your application routes requests directly to our cloud infrastructure while maintaining familiar method signatures and parameter objects.
Developers can integrate our text-to-speech capabilities into their self-publishing pipelines without learning a new proprietary SDK. The standard OpenAI client libraries handle the serialization and request formatting, ensuring consistent behavior across Python, Node.js, and other supported environments.
Change base_url to api endpoint
Point your OpenAI SDK client instance to https://api.tig168.cc/v1. This directs all subsequent calls to Narrative Metrics’ servers while preserving the standard request shape. Ensure you replace the default OpenAI domain in your configuration settings.
Use official OpenAI SDKs directly
Import the standard OpenAI library and initialize it with your Narrative Metrics API key. All parameters such as model, voice, and input text map directly to the expected fields. You can generate audio files using the exact same code structure you would use for OpenAI’s TTS endpoint.
Since the response format matches the official specification, audio data arrives as a binary stream or base64-encoded string, ready for immediate saving or playback in your production workflow.
- Supports Python, JavaScript, and other official SDK variants
- Standard JSON request body for text input and voice selection
- Binary audio response compatible with standard file handling
No custom SDK required
We do not provide a separate Narrative Metrics SDK. Instead, we rely on the widely adopted OpenAI client libraries. This ensures stability and reduces dependency management overhead for your indie studio or startup.
You only need to manage the base URL and API key. No additional packages or custom wrappers are necessary to start generating audiobooks or voice-overs.

Curl Example
Use cURL to verify your integration before building your application. The following example demonstrates a standard request to generate audio using the Narrative Metrics API.
Ensure you replace the placeholder with your actual API key. The command sends the text payload and receives the binary audio data directly to your local drive.
Standard POST request
Send a POST request to the speech endpoint with your Bearer token in the Authorization header. This structure works with any HTTP client that supports standard headers.
- Endpoint: https://api.tig168.cc/v1/audio/speech
- Method: POST
- Header: Authorization: Bearer tts-your-api-key-here
JSON body configuration
Configure the request body with the model, input text, voice preset, and desired output format. The input text must not exceed 4096 characters per request.
- model: "tts-1" or "tts-1-hd"
- voice: e.g., "aria" or "atlas"
- response_format: "mp3", "wav", "opus", "flac", or "pcm"
- input: "Your text here"
Audio file response handling
The API returns the audio file directly in the response body. Use the -o flag in cURL to save the output to a file for immediate playback or further processing.
Rate Limits and Quotas
Rate limits protect the shared inference infrastructure from sudden spikes in demand. Standard accounts operate at 60 requests per minute, while new keys start at 10 requests per minute. This initial cap applies until the first top-up is processed.
The limit upgrades to 60 requests per minute once a TRC-20 transfer is confirmed. Under heavy load, requests are queued sequentially, so long-form audiobook generation may take slightly longer than real-time due to waiting times.
60 requests per minute standard
After your first top-up, your key scales to 60 requests per minute. This throughput is sufficient for most indie publishing workflows, allowing steady generation of chapters without significant bottlenecks.
10 requests per minute initially
New keys begin with a 10 requests per minute limit. This prevents accidental runaway scripts from consuming your $0.50 trial credit too quickly during initial testing phases.
Limits reset after top-up
Limits are per minute and do not expire on a daily cycle. Once your USDT top-up is credited, the rate limit immediately upgrades to the standard tier.
- No daily reset required
- Limits are tied to the key, not time
- Automatic upgrade after TRC-20 confirmation
Error Handling
API responses include standard HTTP status codes to indicate success or failure. A 200 OK response confirms that the audio file has been generated and returned in the specified format. For errors, the API returns a JSON object with a code and message field explaining the issue, such as invalid parameters or authentication failures.
Network timeouts can occur if the generation queue is under heavy load. Since requests are processed sequentially, longer texts may take several seconds to synthesize. Clients should implement reasonable timeout thresholds to avoid hanging connections during high-demand periods.
Check status codes
Always inspect the HTTP status code returned by the API. A 200 status indicates successful generation, while 4xx errors typically relate to request formatting or authentication. A 5xx status suggests a server-side issue. Failed synthesis requests are free, so a non-200 response means no charge was applied to your balance.
Handle network timeouts
Network timeouts may occur if the generation queue is under heavy load. Since requests are processed sequentially, longer texts may take several seconds to synthesize. Clients should implement reasonable timeout thresholds to avoid hanging connections during high-demand periods.
Retry logic for failures
Implement exponential backoff for transient errors like 429 (Too Many Requests) or 5xx server errors. For 429 errors, wait the duration specified in the Retry-After header before retrying. Since failed requests are free, you can safely retry without worrying about unnecessary charges, but avoid infinite loops that could spike your rate limit usage.
- Retry on 429 with exponential backoff
- Retry on 5xx server errors
- No charge for failed requests
Listen to the 8 voices
Each sample below was generated by this API from the same sentence. She excels in scenes requiring enthusiasm or lighter emotional beats.
23 languages
Any voice speaks any of these languages.
Sources and further reading
- Wikipedia
- FFmpeg documentation
- openai-python on GitHub
- LibriTTS-R paper (arXiv 2305.18802)
- LibriTTS-R corpus (OpenSLR 141)
- Creative Commons Attribution 4.0
- LibriVox public-domain audiobooks
- MDN: Web Speech API
- ISO 639 language codes
- Node.js documentation
- W3C WAI: making audio and video accessible
- OpenAI API reference: create speech
