Integrate Our Text-to-Speech API: A Quickstart for Indie Developers

By ShopSpeech editorial team · Updated 2026-11-19

This guide shows indie developers how to integrate our text-to-speech API into online stores and indie products. You will learn to send text and receive audio files using standard JSON requests. The endpoint works with official OpenAI SDKs by simply changing the base URL, making integration fast and familiar for your stack.

We cover authentication, model selection, and voice presets with concrete code examples. You will see how to handle rate limits, error refunds, and response formats like MP3 or WAV. This page is designed for developers who want to convert product descriptions, FAQs, and reviews into audio without wrestling with complex infrastructure or custom SDKs.

Integrate Our Text-to-Speech API: A Quickstart for Indie Developers

Frequently asked questions

How do I get an API key?

Sign up at https://hryfine.info/get-api-key/ using Google or email and password. Your account page displays your API key, balance, and usage. Each account has one active key. You can issue a new key anytime via the dashboard, and the old one stops immediately.

What SDKs are supported?

We do not provide an official SDK. Use the OpenAI SDK or plain HTTP requests. The endpoint shape matches the OpenAI speech endpoint, so any OpenAI-compatible client works by adjusting the base URL. No custom mobile or web SDKs are available.

Can I use the OpenAI Python SDK?

Yes. The API uses the same request shape as OpenAI. You can use the official OpenAI Python SDK by setting the base URL to https://api.hryfine.info/v1 and providing your ShopSpeech API key in the authorization header.

How do I change the base URL?

Set your SDK or HTTP client base URL to https://api.hryfine.info/v1. This allows you to use standard OpenAI SDKs. Send POST requests to /v1/audio/speech with your text, voice, and model parameters in the JSON body.

What is the maximum character limit?

Each request supports up to 4096 characters. For longer texts, split your input into parts of this size and join the resulting audio files. Spaces and punctuation count toward the limit. The typical processing speed is roughly 25 characters per second.

How do I set the language?

Pass the optional language field with an ISO code (e.g., 'de' for German). If omitted, the system guesses the language from the script. Latin script defaults to English, so explicitly set the language for non-English Latin text.

What are the response formats?

You can choose mp3, wav, opus, flac, or pcm via the response_format field. Each generated file includes an inaudible watermark marking it as synthetic speech. The audio is returned directly in the response body and is not stored.

How do I handle rate limits?

The limit is 60 requests per minute per key (10 per minute before the first top-up). Requests are processed sequentially, so under load, your request may wait in a queue. Failed requests do not consume your credit.

What happens if the API is down?

We do not offer an SLA or uptime guarantee. If synthesis fails, the charge is returned in full. Request metadata is kept for billing purposes. Support is available via email only; there is no live chat or phone support.

Can I rotate my API key?

Yes. You can issue a new API key at any time from your account dashboard. When a new key is issued, the old one stops working immediately. This allows you to secure your account or rotate keys easily.

How do I check my usage?

Visit https://hryfine.info/get-api-key/ to view your balance, characters left, and usage history. Failed requests are free. You can track your spending based on the $0.01 per 1,000 characters pricing model directly from this dashboard page.

Is streaming supported?

No, streaming is not supported. You receive the complete audio file after synthesis. There is no real-time partial audio. You must wait for the full response, which may take time for longer texts due to queuing.

Do I need to install dependencies?

If using the OpenAI SDK, you must install it. For plain HTTP, no dependencies are required. We do not provide a dedicated ShopSpeech SDK. Use standard HTTP libraries available in your preferred programming language to send POST requests.

How do I parse the audio response?

The API returns the audio file directly in the response body. Save this binary data to a file with the extension matching your chosen response_format. The audio contains an inaudible synthetic watermark. No additional parsing of JSON metadata is needed for the audio itself.

First request

curl

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

Authentication

Sound wave illustration for: Authentication

Access to the ShopSpeech API requires a valid API key. You can generate your first key by signing up on the /get-api-key/ page using either Google or an email address. Once registered, your dashboard displays your unique key, initial balance, and usage statistics.

Generate your API key

Generate your API key

To begin, navigate to the /get-api-key/ page and create an account via Google or email. Your API key appears immediately in your dashboard alongside your current balance and character count. This key is the sole credential required to authenticate your requests.

  • Create an account via Google or email
  • Key appears instantly on your dashboard
  • One active key per account

Bearer token format

Bearer token format

Include your key in the request header as a Bearer token. The format is Authorization: Bearer tts-..., where the value is your specific API key string. Ensure no extra spaces are added around the token value to avoid authentication errors.

  • Header: Authorization: Bearer tts-...
  • Replace ... with your actual key
  • No extra spaces allowed

Key rotation policy

You can issue a new API key at any time via your dashboard. When a new key is generated, the previous one becomes inactive immediately. This allows you to revoke access without waiting for expiration, ensuring your endpoints remain secure as your project scales.

  • Issue new keys anytime from dashboard
  • Old key stops immediately upon rotation
  • No waiting period for old keys

Speech endpoint

Sound wave illustration for: Speech endpoint

To generate audio, send a POST request to https://api.hryfine.info/v1/audio/speech. The endpoint accepts JSON and returns the synthesized audio file directly in the response body. This workflow allows indie developers to seamlessly convert product descriptions or FAQs into audio files for their online stores without managing complex streaming connections.

POST /v1/audio/speech

Use standard HTTP POST requests to this endpoint. You can use the official OpenAI SDKs by pointing base_url to https://api.hryfine.info/v1, or use plain HTTP clients like cURL.

JSON body structure

The request body must be a JSON object containing the text to synthesize and the desired audio parameters. Ensure the text does not exceed 4096 characters per request.

Required fields explanation

The model field accepts "tts-1" or "tts-1-hd". The input field holds your text. You must specify a voice from the 8 available presets and choose a response_format (mp3, wav, opus, flac, or pcm).

  • model: "tts-1" or "tts-1-hd"
  • input: text string (max 4096 chars)
  • voice: one of the 8 presets
  • response_format: mp3, wav, opus, flac, or pcm

Available models

Sound wave illustration for: Available models

Choose between two model identifiers that drive the same underlying synthesis engine. Both tts-1 and tts-1-hd use the same engine and are priced equally at $10 per million characters.

Select the model string in your JSON payload to trigger the engine. The choice is purely syntactic for your code, ensuring compatibility with standard OpenAI SDK patterns without affecting cost or output fidelity.

tts-1 standard model

Use the tts-1 model string in your API requests. It serves as the default identifier for our synthesis engine.

It processes text through the same engine as the high-quality variant.

  • Identifier: tts-1
  • Engine: Standard synthesis network
  • Use case: General purpose TTS

tts-1-hd high quality model

Use the tts-1-hd model string. It runs on the identical engine as the standard model.

  • Identifier: tts-1-hd
  • Engine: Identical to tts-1
  • Audio quality: Same output

Same engine and price

Both model strings trigger the exact same synthesis process.

The price remains constant at $0.01 per 1,000 characters regardless of which model string you send in the request body.

  • No quality difference
  • Same price: $10/1M chars
  • Interchangeable identifiers

Voice selection

Sound wave illustration for: Voice selection

Choose from eight distinct voice presets to match your product’s personality. Each voice is built from licensed recordings, ensuring clear and natural speech for your digital products.

8 voice presets available

Select from female voices like Aria (warm narrator) and Nova (upbeat), or male voices like Felix (energetic) and Atlas (neutral news). All voices support all 23 languages.

Gender and tone options

Pick the tone that fits your content. Use Sage for calm instructions, Orion for deep documentaries, or Luna for soft storytelling. Voices adapt to any language in our list.

Voice ID usage

Pass the voice ID (e.g., 'aria', 'felix') in your JSON body. The API uses this ID to generate audio in the selected voice.

  • aria
  • nova
  • luna
  • sage
  • felix
  • milo

Response formats

Sound wave illustration for: Response formats

The API returns the audio file in the response body. The format is determined by your response_format parameter, allowing you to choose between standard and lossless options depending on your storage and bandwidth needs.

MP3 output format

MP3 is the default and most compatible format, suitable for web players and mobile apps. It offers a good balance between file size and audio quality for general use cases like product descriptions or FAQs.

WAV, OPUS, FLAC, PCM

Choose WAV or FLAC for lossless, high-fidelity audio ideal for archival or professional editing. OPUS provides efficient compression, while PCM offers uncompressed raw audio data. Select based on your specific infrastructure requirements.

Binary response handling

The response body contains the raw audio bytes, not a JSON object. You must handle the binary data directly in your client code. Ensure your HTTP client is configured to save the raw response body to a file or stream it appropriately.

Response formats

Parameters and limits

Sound wave illustration for: Parameters and limits

Before sending your first request, understand the core constraints that keep synthesis fast and predictable. Our API is designed for straightforward integration, handling text up to 4096 characters per call. For longer product descriptions or FAQ pages, simply split the text into chunks and join the resulting audio files.

Input text length limit

Each request accepts a maximum of 4096 characters, including spaces and punctuation. This limit ensures consistent processing times. If your content exceeds this, split the text into smaller parts, generate each segment, and concatenate the audio outputs.

Speed control range

Adjust the speaking rate between 0.25 and 4.0 to fit your product's pace. A faster speed suits quick promo videos, while a slower rate improves clarity for detailed instructions. The default speed is 1.0.

  • Minimum: 0.25 (half speed)
  • Maximum: 4.0 (double speed)
  • Default: 1.0

Language code specification

You can optionally specify a language using its ISO code. If omitted, the system guesses the language from the text script, defaulting to English for Latin characters. For non-English Latin-script text, always set the language parameter to ensure accurate pronunciation.

Rate limits

Sound wave illustration for: Rate limits

Understanding rate limits helps you plan your integration strategy without unexpected interruptions. Our system processes requests sequentially, meaning longer texts may queue during high traffic. Knowing these thresholds ensures your app remains responsive while generating product descriptions or FAQs.

You can scale your usage smoothly as your store grows.

60 requests per minute

Once your account is fully active, you can send up to 60 requests per minute. This throughput is sufficient for many batch processing tasks.

Requests are processed one after another, so under load, a request may wait in a queue. Typical speed is roughly real time, taking about 25 characters of text per second of generation.

  • Standard limit for active accounts
  • Processes sequentially
  • Queues during high load

10 requests per minute initially

New accounts start with a conservative limit of 10 requests per minute. This allows you to test the API with your free trial credit without overwhelming the servers.

This lower threshold helps ensure stability for new integrations while you debug your implementation.

  • Default for new accounts
  • Good for testing
  • Conservative limit

Limit increase after top-up

Your rate limit increases to 60 requests per minute once you make your first top-up. You can top up using USDT on the TRON network (TRC-20), with a minimum of $5.

Credits are credited automatically within minutes after the transfer, and your usage capacity is updated immediately.

  • Requires USDT (TRC-20) top-up
  • Minimum $5
  • Automatic credit within minutes

Error handling

Sound wave illustration for: Error handling

TTS APIs are simple, but network hiccups or malformed JSON can break your request. Understanding how errors are reported helps you build robust integrations without unnecessary guesswork.

Common error codes

You will primarily encounter 400 (Bad Request) for invalid JSON or missing fields, and 401 (Unauthorized) if your API key is missing or invalid. A 429 status indicates you have exceeded the 60 requests per minute limit.

  • 400: Invalid JSON structure or unsupported parameters.
  • 401: Invalid or expired API key.
  • 429: Rate limit exceeded (wait and retry).

Failed request refunds

If a synthesis fails due to a server-side issue, the character count is not deducted from your balance. You receive a full refund for that specific request automatically.

Debugging tips

Ensure your text input is under 4096 characters. Verify that your voice ID matches one of the 8 presets. If you encounter persistent errors, contact support via email with your request ID and timestamp.

  • Check character count limits.
  • Verify voice IDs against the /v1/voices endpoint.
  • Email support with request IDs for server issues.

Listen to the 8 voices

Each sample below was generated by this API from the same sentence. You can match your brand’s personality by choosing between warm narrators or clear instructional voices.

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. IETF RFC 7845: Ogg Opus
  3. LibriTTS-R corpus (OpenSLR 141)
  4. Python documentation
  5. openai-node on GitHub
  6. ISO 639 language codes
  7. MDN: Web Speech API
  8. TRON developer hub: TRC-20
  9. Node.js documentation
  10. W3C WAI: making audio and video accessible
  11. curl documentation
  12. FFmpeg documentation

More on this site