Frequently asked questions
What is the base URL for the API?
The API base URL is https://api.pos2.info/v1. You can use the official OpenAI SDKs by changing the base_url to this endpoint. All requests, including speech synthesis and voice listing, are sent to this address using standard HTTP methods and JSON bodies.
Do I need to install a specific library?
No proprietary library is required. You can use the official OpenAI SDKs or plain HTTP requests. Since the request shape matches the OpenAI speech endpoint, you only need to adjust the base_url to https://api.pos2.info/v1 and provide your API key for authentication.
How do I handle long texts exceeding 4096 characters?
The API accepts up to 4096 characters per request. For longer texts, you must split the input into parts of up to 4096 characters each. After receiving the audio files for each part, you need to join them together to create the final audio file.
Is the API synchronous or asynchronous?
The API is synchronous. When you send a POST request, you receive the audio file in the response. Requests are processed one after another, so under load, a request may wait in a queue before being generated. There is no asynchronous webhook for completion.
Can I stream the audio while it generates?
No, streaming is not supported. The API returns the complete audio file in the response body after generation is finished. There is no WebSocket or real-time partial audio support. You must wait for the full response before you can play or save the audio.
What happens if I exceed the rate limit?
The rate limit is 60 requests per minute per key. If you exceed this, your requests may be delayed or rejected. New accounts start with a limit of 10 requests per minute. You can monitor your usage in the dashboard to stay within these limits.
How do I specify the output format?
Include the response_format field in your JSON body. You can choose from mp3, wav, opus, flac, or pcm. This field is optional, but specifying it ensures you receive the audio in your preferred format. The default format is mp3 if not specified.
Does the API support SSML tags?
No, the API does not support SSML tags. It accepts plain text input. There are no phoneme dictionaries or custom pronunciation lexicons available. You can control speed and voice, but you cannot use SSML for detailed prosody control like pauses or emphasis within the text.
Can I use the same key for multiple projects?
Yes, you can use the same API key for multiple projects. Each account has one active key that can be used across different applications. If you need to revoke access, you can issue a new key at any time, and the old one stops immediately.
How do I know which voice supports which language?
Any of the 8 voices can speak any of the 23 supported languages. You can list available voices and languages by sending a GET request to /v1/voices. The API guesses the language from the script if not specified, but you can set it explicitly for accuracy.
Is there a webhook for completed tasks?
No, there is no webhook support. The API is synchronous, so you receive the audio file directly in the response. You do not need to set up a webhook to know when generation is complete; the response indicates success or failure immediately.
Can I pause and resume generation?
No, you cannot pause and resume generation. The API processes requests sequentially and returns the full audio file upon completion. There is no state management for partial generation. You must wait for the request to finish before receiving the audio data.
What is the maximum speed setting?
The maximum speed setting is 4.0. The speed parameter accepts values between 0.25 and 4.0. This allows you to adjust the speaking rate of the generated audio. The default speed is 1.0, which represents normal speech pace.
How do I detect the language automatically?
If you do not set the language field, the API guesses it from the script. Latin text defaults to English. For non-English Latin-script text, you should set the language field explicitly. Supported languages include Arabic, Chinese, English, and 20 others.
First request
curl
curl https://api.pos2.info/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.pos2.info/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.pos2.info/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
Start by visiting the /get-api-key/ page on pos2.info to generate your unique API key. You can sign up using Google or an email password. The dashboard displays your active key, current balance, and usage statistics immediately after creation.
Generate your API key on the dashboard
Your API key appears in plain text on the dashboard for easy copying. Use it in the Authorization: Bearer header for all requests. The key grants access to the TTS endpoint and reflects your current credit balance.
One active key per account
Each account maintains exactly one active API key at any time. If you generate a new key, the previous one stops working immediately. This ensures that only one credential is valid, simplifying security management for your e-commerce integrations.
Rotate keys anytime via the UI
Rotate your key directly from the dashboard without code changes. Click the rotate button to invalidate the old key and receive a new one instantly. This is useful if you suspect exposure or want to refresh credentials periodically.
First request with curl
Start by sending a simple POST request to the speech endpoint. This is a quick way to verify your key works before integrating into your e-commerce workflow.
Use POST to /v1/audio/speech
Direct your requests to the API base URL. Ensure you include your Bearer token in the Authorization header to authenticate the call.
Include JSON body with model and voice
Structure your payload with the required fields. You must specify the model (tts-1 or tts-1-hd), the input text, and your chosen voice preset.
- model: "tts-1"
- voice: "nova"
- input: "Your product description here"
- response_format: "mp3"
Receive audio file in response
The API returns the generated audio file directly in the response body. Save this file to your server or use it immediately for store notifications.
Using the OpenAI SDK
You can use the official OpenAI SDKs by simply changing the base_url to https://api.pos2.info/v1 and providing your VoiceCart key. This approach lets you integrate our text-to-speech API directly into your existing codebase without learning a new client library or managing custom dependencies.
Change base_url to our endpoint
Point your SDK client to our API base URL instead of the default OpenAI endpoint. This ensures all requests are routed to our infrastructure while maintaining the standard request structure you already know.
Use standard speech parameters
Pass standard parameters like model, input, voice, and response_format just as you would for OpenAI. The request shape is identical, so your existing logic for generating audio works immediately.
No custom SDK required
Since we mirror the OpenAI speech endpoint structure, you do not need a dedicated VoiceCart SDK. You can continue using the language-specific OpenAI libraries you are already comfortable with, reducing integration overhead for your team.
Request parameters and models
Select tts-1 or tts-1-hd based on your quality needs; both use the same engine and pricing. The input field accepts up to 4096 characters per request, with spaces and punctuation counting toward the limit. For longer product descriptions, split the text and join the resulting audio files.
Models: tts-1 or tts-1-hd
Both models use the same engine and price. Use tts-1-hd if you prefer the higher fidelity label,
Voices: 8 presets available
Choose from eight distinct presets to match your brand voice. Female options include Aria (warm narrator), Nova (bright), Luna (soft storytelling), and Sage (calm instruction). Male voices include Felix (energetic promo), Milo (friendly), Atlas (neutral news), and Orion (deep documentary).
- Aria: Warm, clear narrator
- Nova: Bright, upbeat
- Luna: Soft, storytelling
- Sage: Calm, instructional
- Felix: Energetic, promo
- Milo: Friendly, conversational
Speed: 0.25 to 4.0 multiplier
Adjust the speed parameter between 0.25 and 4.0 to control pacing. This allows you to create concise store notifications or relaxed product walkthroughs without re-recording. Typical generation speed is roughly real-time for long texts.
Response formats and languages
Choose the output format that best fits your e-commerce infrastructure. We support MP3, WAV, Opus, FLAC, and PCM. The default format is mp3 if not specified. Select WAV for high-fidelity store notifications or Opus to reduce bandwidth usage in your marketing apps.
Formats: MP3, WAV, Opus, FLAC, PCM
Each format serves different needs. MP3 is efficient for web playback. WAV provides uncompressed audio for precise editing. Opus offers small file sizes. FLAC ensures lossless quality. PCM provides raw data streams.
- MP3: Default, balanced quality and size
- WAV: Uncompressed, high fidelity
- Opus: Efficient, low bandwidth
- FLAC: Lossless compression
- PCM: Raw audio data
Optional language code setting
Set the language parameter using ISO codes to ensure accurate pronunciation. This is crucial when your product descriptions contain mixed scripts or when the voice might otherwise guess the wrong language. Our API supports 23 languages, including English, Spanish, German, and Japanese.
Automatic detection for Latin script
If you do not set the language, the system guesses it from the script. Latin script text defaults to English. For non-English Latin-script text, such as French or Portuguese, you should explicitly set the language code to avoid incorrect pronunciation.

Rate limits and performance
Understand how VoiceCart handles traffic to keep your product audio generation smooth and predictable. Knowing the limits helps you plan your integration strategy, whether you are generating short store notifications or bulk product descriptions.
Our system processes requests sequentially, meaning performance depends on current load. This section explains the specific limits and how queuing works during high demand.
60 requests per minute limit
Each API key allows up to 60 requests per minute. This limit applies per key.
This rate is sufficient for most e-commerce workflows, from real-time cart notifications to batch processing catalog updates.
10 requests before first top-up
New accounts start with a limit of 10 requests per minute before the first top-up. This ensures fair usage during the initial trial period.
Once you add USDT (TRC-20), your limit increases to the standard 60 requests per minute immediately.
Queued processing under load
Requests are processed one after another. Under heavy load, your request may wait in a queue before synthesis begins.
Expect typical speeds of roughly 25 characters of text per second. Short phrases may take a few seconds to generate, while longer texts process in near real-time.
- Implement exponential backoff to handle temporary delays gracefully.
- Check response status codes to identify if a delay is due to queuing or a failure.
Handling errors and retries
The API returns standard HTTP status codes to indicate success or failure. A 2xx response contains the audio binary, while 4xx errors (like invalid keys) or 5xx server errors signal issues. Always check the status code before parsing the response body.
Failed synthesis requests are automatically refunded to your balance. If the engine cannot generate audio due to a temporary glitch, you are not charged. This ensures you only pay for successful deliveries.
Check status codes in response
Inspect the HTTP status code immediately. A 200 OK means the audio is ready. Codes like 401 (Unauthorized) indicate an invalid or expired API key, while 429 (Too Many Requests) means you hit the rate limit.
- 200: Success, audio data included
- 401: Invalid or missing API key
- 429: Rate limit exceeded (60 req/min)
- 500: Internal server error, retry later
Failed requests refund automatically
If synthesis fails due to server-side issues, the character count is not deducted from your balance. No manual claim is required; the refund is applied automatically. This applies to both the free trial and paid USDT top-ups.
Implement exponential backoff
Under load, requests may queue, causing delays or timeouts. Implement exponential backoff in your retry logic to handle 429 errors gracefully. Start with a short delay (e.g., 1 second) and double it with each retry to avoid overwhelming the API during peak times.
Voice selection guide
VoiceCart provides eight preset voices trained on licensed recordings, ensuring consistent quality for your e-commerce content. Each voice is designed for specific tonal needs, from clear narration to energetic promos.
Female voices: Aria, Nova, Luna, Sage
Aria offers a warm, clear narrator style ideal for product descriptions. Nova provides a bright, upbeat tone perfect for marketing content. Luna delivers a soft, storytelling voice suitable for longer narratives. Sage ensures a calm, instructional delivery for store notifications.
- Aria: Warm, clear narrator
- Nova: Bright, upbeat
- Luna: Soft, storytelling
- Sage: Calm, instructional
Male voices: Felix, Milo, Atlas, Orion
Felix brings an energetic, promo-ready voice to highlight sales. Milo offers a friendly, conversational tone for customer updates. Atlas provides a neutral, news-style delivery for clear information. Orion adds a deep, documentary feel for premium brand stories.
- Felix: Energetic, promo
- Milo: Friendly, conversational
- Atlas: Neutral, news
- Orion: Deep, documentary
Choose based on brand tone
Match your voice to your brand identity. Use Nova or Felix for dynamic campaigns, and Sage or Atlas for reliable, clear updates. All voices support 23 languages, allowing you to localize content while maintaining a consistent auditory brand experience across your store.
- Dynamic campaigns: Nova, Felix
- Clear updates: Sage, Atlas
- Storytelling: Luna, Orion
Listen to the 8 voices
Each sample below was generated by this API from the same sentence. Male voices often convey reliability and energy in e-commerce contexts.
23 languages
Any voice speaks any of these languages.
