Quickstart: Integrate TTS API with cURL and OpenAI SDK

By VocalLingo editorial team · Updated 2026-11-19

This guide shows you how to integrate the VocalLingo TTS API for generating audiobooks and learning materials. You will learn to send text and receive audio files using simple cURL commands or the official OpenAI SDKs. The process is designed for content creators who need a reliable, character-based workflow without complex infrastructure.

We cover key integration steps: obtaining your API key, understanding rate limits, and handling long texts by splitting them into chunks. You will also see how to manage errors and ensure you are not charged for failed requests. This practical reference helps you get from sign-up to your first audio file quickly and accurately.

Quickstart: Integrate TTS API with cURL and OpenAI SDK

Frequently asked questions

How do I get an API key?

Sign up on the /get-api-key/ page using Google or email and password. Your account is specific to this site. The dashboard displays your active key, 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.aurga33.info/v1. Use the POST endpoint https://api.aurga33.info/v1/audio/speech for synthesis. Other endpoints include GET /v1/voices and GET /v1/models. Ensure your requests target this specific domain to authenticate correctly with your Bearer token.

Can I use the OpenAI Python SDK?

Yes. The request shape matches the OpenAI speech endpoint. Change the SDK's base_url to https://api.aurga33.info/v1 and provide your VocalLingo key. This allows you to use the official OpenAI SDKs directly without writing custom HTTP clients or handling JSON serialization manually.

How do I handle long texts?

Split input text into parts of up to 4096 characters. Send each part as a separate request to the speech endpoint. Join the resulting audio files on your end. This ensures compliance with character limits while allowing you to generate audio for entire chapters or documents.

What are the rate limits?

Limits are 60 requests per minute per key. Before your first top-up, the limit is 10 requests per minute. Requests are processed sequentially, so under load, your request may wait in a queue. Monitor your dashboard to track usage and avoid hitting these thresholds.

How do I specify a language?

Include the optional 'language' field with an ISO code in your JSON body. If omitted, the system guesses the language, defaulting to English for Latin script. For non-English Latin text, explicitly setting the language ensures accurate pronunciation and voice selection across the 23 supported languages.

What happens if I exceed the rate limit?

Requests are processed one after another, so under load your request may wait in a queue. If the server rejects the request due to limits, you will receive an error response. Failed synthesis requests are free, but rate limit errors may require retrying later.

Is the API key shared across devices?

Yes, the single active key works across all devices and applications. You can use it in Python scripts, cURL commands, or web apps simultaneously. If you issue a new key, the old one stops working immediately on all devices, ensuring secure access control.

How do I change my API key?

Issue a new key from your account dashboard on /get-api-key/. The new key becomes active immediately. The previous key stops working at once, ensuring that any compromised or unused keys are invalidated. You can manage this directly through the site's interface without contacting support.

What error codes might I receive?

Standard HTTP error codes indicate issues like authentication failures or rate limits. Failed synthesis requests return a full refund of the character cost. Check the response body for details. Specific error messages will guide you on whether the issue is with your input text or account status.

Can I stream the audio response?

No. The API returns the complete audio file in the response body. There is no streaming, WebSocket, or real-time partial audio support. You receive the full file once synthesis is complete. This simplifies integration but requires waiting for the entire file before playback can begin.

Do I need to install extra libraries?

No. You can use plain HTTP requests or the official OpenAI SDK. No proprietary library is required. We do not have our own SDK. The OpenAI SDK works by changing the base URL. This keeps your dependencies minimal and allows you to use standard tools like cURL or any HTTP client.

Is the documentation open source?

No. The documentation is hosted on this site and is not open source. It provides specific facts about the VocalLingo API, including endpoints, voices, and pricing. While the API uses standard formats, the documentation itself is proprietary to this storefront and not available on public repositories.

How do I test the API without spending money?

Sign in with Google to receive a $0.50 free trial credit, valid for 7 days. This covers about 50,000 characters. Email/password accounts start without trial credit. Use this credit to test voices, languages, and formats before topping up with USDT (TRC-20) for larger projects.

First request

curl

curl https://api.aurga33.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.mp3

Python (openai)

from openai import OpenAI

client = OpenAI(base_url="https://api.aurga33.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.aurga33.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
ariafemale
novafemale
lunafemale
sagefemale
felixmale
milomale
atlasmale
orionmale
language
arالعربية
zh中文
daDansk
nlNederlands
enEnglish
fiSuomi
frFrançais
deDeutsch
elΕλληνικά
heעברית
hiहिन्दी
itItaliano
ja日本語
ko한국어
msBahasa Melayu
noNorsk
plPolski
ptPortuguês
ruРусский
esEspañol
swKiswahili
svSvenska
trTürkçe

Get Your API Key

Sound wave illustration for: Get Your API Key

Create an account on aurga33.info to receive your unique API key. You can sign in using your Google account for an immediate $0.50 free trial (valid for 7 days), or register with an email and password. Note that email-based accounts start without trial credit.

Sign up on the site

Sign up on the site

Visit the /get-api-key/ page to register. The process is straightforward: choose your preferred authentication method, verify your identity, and you will be redirected to your dashboard.

Copy your Bearer token

Copy your Bearer token

Once logged in, your dashboard displays your active API key. Copy this token immediately; it begins with tts- and is required for all API requests. Use it in the Authorization: Bearer header.

One key per account

One key per account

Each account holds exactly one active API key. If you need to rotate your key, you can issue a new one at any time. The previous key stops working immediately upon the new key’s creation.

First Request with cURL

Sound wave illustration for: First Request with cURL

The API endpoint accepts your text and returns the synthesized audio file directly in the response body. Note that the audio is not stored by the API; it is delivered immediately and discarded after transfer.

POST to /v1/audio/speech

Send a POST request to https://api.aurga33.info/v1/audio/speech. The endpoint processes your input text and generates the corresponding audio file, returning it in the response body. No complex streaming or WebSocket connections are required for this standard request.

JSON body with input text

Include your text in the input field of the JSON body. You can specify the model (tts-1 or tts-1-hd), the desired voice from the eight presets, and the response_format (mp3, wav, opus, flac, or pcm). Optional parameters like speed and language allow fine-tuning of the output.

Receive audio file

Upon successful synthesis, the API returns the audio file directly in the response body. Note that the audio is not stored by the API. You receive the binary data immediately, allowing you to save it directly to your local storage or upload it to your content delivery network.

OpenAI SDK Integration

Sound wave illustration for: OpenAI SDK Integration

VocalLingo’s API follows the same request shape as OpenAI’s speech endpoint. You do not need a custom library or wrapper; simply point your existing code to our infrastructure using standard client configurations.

Change base_url to api domain

Update your client configuration to use the VocalLingo API base URL: https://api.aurga33.info/v1. This single change redirects all synthesis requests to our cloud infrastructure while maintaining standard compatibility.

Use official SDKs

Leverage existing OpenAI SDKs for Python, Node.js, Go, and other supported languages. No custom client code is required; the official packages handle the JSON serialization and response parsing automatically.

Same request shape

The JSON body structure remains identical to the OpenAI standard. Pass your text, selected voice, and desired format exactly as you would for standard speech synthesis, ensuring immediate integration with your existing content pipelines.

Supported Parameters

Sound wave illustration for: Supported Parameters

The API accepts two model variants, tts-1 and tts-1-hd, which use the same underlying engine and pricing. You select the model based on your quality preference, though both deliver natural-sounding audio for your content.

Choose from eight distinct voice presets, including female options like Aria and Nova, or male voices such as Felix, Milo, Atlas, and Orion. Each voice supports all 23 available languages, allowing you to maintain consistent audio style across different languages.

Model: tts-1 or tts-1-hd

Both model identifiers trigger the same synthesis engine and incur identical charges. Use tts-1 for standard generation or tts-1-hd for higher fidelity. The request body accepts either value in the model field without affecting other parameters.

Voice: 8 presets

Select one of eight voices to define the audio character. Options include warm narrators, upbeat presenters, or calm instructional tones. All voices speak any of the 23 supported languages, though setting the language field ensures accurate pronunciation for non-English text.

The API does not support custom voice cloning or emotion tags. You must choose from the fixed presets provided in the /v1/voices endpoint.

  • aria: warm, clear narrator
  • nova: bright, upbeat
  • luna: soft, storytelling
  • sage: calm, instructional
  • felix: energetic, promo
  • milo: friendly, conversational
  • atlas: neutral, news
  • orion: deep, documentary

Format: mp3, wav, opus, flac, pcm

Specify the output file type using the response_format parameter. Available options are mp3, wav, opus, flac, and pcm. Choose the format that best fits your playback infrastructure or editing workflow.

Note that format selection does not affect character pricing or generation speed. The audio content remains identical regardless of the container format chosen.

Rate Limits

Sound wave illustration for: Rate Limits

The API enforces a standard rate limit of 60 requests per minute per active key. This limit applies to the POST /v1/audio/speech endpoint, allowing consistent throughput for batch processing audiobooks or learning materials without exceeding your quota unexpectedly.

During normal operation, you can sustain this steady stream of requests. If you exceed the limit, subsequent requests will be rejected until the window resets, ensuring fair usage across all accounts on the network.

60 requests per minute

You are allowed 60 successful synthesis requests every 60-second window. This capacity is sufficient for most content creation workflows, such as generating multiple chapters or lesson segments sequentially.

The limit resets every minute, allowing you to maintain a consistent production pace. Monitor your usage dashboard to stay within this threshold and avoid unnecessary rejections.

  • Applies per API key
  • Resets every 60 seconds
  • Counts each POST request

10 requests before top-up

Accounts created with Google sign-in start with a free trial credit of $0.50 but are restricted to 10 requests per minute before the first top-up. Email/password accounts start without trial credit. This restriction ensures efficient use of the free tier.

Once you add USDT (TRC-20) to your balance, the limit increases to the standard 60 requests per minute. The top-up is credited automatically within minutes.

  • Limited to 10 req/min
  • Unlocks after first top-up
  • No subscription required

Queue under load

Requests are processed sequentially. Under heavy load, your request may wait in a queue before synthesis begins. This can increase latency for long texts but does not affect the output quality.

Typical speed is roughly real time (25 characters per second). If your queue grows, generation time increases proportionally. Plan your batch jobs accordingly to avoid delays during peak hours.

  • Processed one after another
  • Latency increases under load
  • No priority queue available

Handling Long Texts

Sound wave illustration for: Handling Long Texts

Processing long texts requires breaking them into segments of up to 4096 characters each. Note that spaces and punctuation count as characters in this limit. This ensures each API request stays within the defined constraints for reliable synthesis.

Split into 4096 char chunks

Divide your source text into segments not exceeding 4096 characters. Spaces and punctuation count as characters.

Generate audio for each

Send each segment as a separate POST request to the /v1/audio/speech endpoint. The API processes requests sequentially, so under load, later chunks may wait in a queue before synthesis begins. Each request returns a distinct audio file.

Join audio files

Collect the returned audio files and concatenate them in the original order. This creates a single continuous audio track that mirrors your full text input, suitable for audiobooks or learning materials.

Error Handling

Sound wave illustration for: Error Handling

The API returns standard HTTP status codes to indicate the outcome of your synthesis request. A 200 OK response includes the audio file in the body. Non-200 responses, such as 400 (Bad Request) or 429 (Too Many Requests), include a JSON error object describing the issue, such as an invalid voice ID or exceeded rate limits.

Check status codes

Always inspect the HTTP status code before parsing the response body. A 200 status confirms successful generation. Codes like 400 indicate invalid parameters (e.g., text exceeding 4096 characters), while 401 or 403 signals an invalid or revoked API key. Use these codes to trigger specific client-side logic, such as prompting for key renewal or adjusting request parameters.

Retry on failure

Implement exponential backoff for transient errors like 500 (Server Error) or 503 (Service Unavailable). Since requests are processed sequentially, high load may cause temporary delays. If you receive a 429 Too Many Requests error, wait before retrying to respect the 60 requests per minute limit. Avoid immediate aggressive retries to prevent queueing issues.

No charge on error

If synthesis fails due to server-side issues or invalid input, the request is free. Failed requests do not deduct from your balance. You can safely retry the same text without worrying about double-charging. Note that character counts are only tallied for successful generations. This ensures you only pay for usable audio files.

Authentication

Sound wave illustration for: Authentication

Authentication is handled via a Bearer token passed in the Authorization header of every request. Include Authorization: Bearer tts-... to identify your account and apply your rate limits and billing.

Bearer token in header

Include the full token string in the Authorization: Bearer <key> header. This simple HTTP header is all that is required to authorize your requests against the API.

One active key

Each account maintains exactly one active API key at any time. This key is linked to your balance, usage limits, and billing records. If you need to rotate your key, the old one stops working immediately upon issuing a new one.

Revoke and issue new key

You can generate a new key at any time from your dashboard. The previous key becomes invalid instantly, ensuring that only your current device or service uses the new token. This allows for quick revocation if a key is exposed.

Since there is only one key, you do not need to manage multiple credentials. Just update your configuration with the new token issued from the /get-api-key/ page.

Listen to the 8 voices

Each sample below was generated by this API from the same sentence. Generate short samples to hear how each voice handles your specific content style.

Avatar of the voice aria
ariafemale
Avatar of the voice nova
novafemale
Avatar of the voice luna
lunafemale
Avatar of the voice sage
sagefemale
Avatar of the voice felix
felixmale
Avatar of the voice milo
milomale
Avatar of the voice atlas
atlasmale
Avatar of the voice orion
orionmale

23 languages

Any voice speaks any of these languages.

Sources and further reading

  1. Wikipedia
  2. Creative Commons Attribution 4.0
  3. Tether (USDT)
  4. W3C WAI: making audio and video accessible
  5. openai-python on GitHub
  6. LibriTTS-R paper (arXiv 2305.18802)
  7. openai-node on GitHub
  8. curl documentation
  9. LibriVox public-domain audiobooks
  10. MDN: Web Speech API
  11. IETF RFC 7845: Ogg Opus
  12. Node.js documentation

More on this site