How to Integrate Our Text-to-Speech API into WordPress Sites?

By VerbaFlow editorial team · Updated 2026-11-18

This guide explains how to integrate VerbaFlow’s text-to-speech API into WordPress environments. We provide concrete steps for developers and content teams to convert blog posts and newsletters into audio files using a standardized REST endpoint. The process requires only a valid API key and standard WordPress admin access, ensuring a straightforward deployment without complex infrastructure changes.

You will learn to construct API requests, handle JSON responses, and implement custom plugins with shortcodes. The instructions cover frontend audio player design, caching strategies, and cost management for character-based billing. This page is intended for technical writers and site administrators who need reliable, scalable audio generation with transparent overhead and no monthly subscriptions.

How to Integrate Our Text-to-Speech API into WordPress Sites?

Frequently asked questions

What is required to integrate the API?

Integrate using your API key and a standard HTTP client. Send a POST request to https://api.999gameslot.com/v1/audio/speech with JSON parameters for model, input, voice, and response_format. No custom SDK is required; the official OpenAI SDK works by setting the base_url to https://api.999gameslot.com/v1. This approach ensures compatibility with existing server-side scripts and standard libraries for reliable audio generation.

Do I need a developer?

A developer is recommended to securely manage API keys, handle rate limits, and split long texts exceeding 4096 characters. While the API uses standard HTTP, custom code ensures reliable integration. Non-developers can use existing WordPress plugins that support generic REST endpoints, though manual management of requests and billing remains necessary.

Can I use a WordPress plugin?

Yes. You can use any WordPress plugin supporting generic REST API calls or custom HTML/JavaScript. As we do not provide an official WordPress plugin, you must configure it to send POST requests to https://api.999gameslot.com/v1/audio/speech with the correct authentication header and JSON body parameters.

How do I store the API key?

Store your API key in your WordPress environment variables or database, avoiding client-side JavaScript to prevent exposure. Use the format tts-... in the Authorization: Bearer header. You can regenerate the key from your dashboard at any time; the new key activates immediately, and the previous one stops at once.

Is the integration complex?

Integration is straightforward. Send a POST request with text and voice parameters to receive an audio file. For texts exceeding 4096 characters, split the input into parts and join the resulting audio segments on the server side. This ensures reliable delivery for longer content without requiring complex client-side logic or streaming capabilities.

Does it affect site speed?

API processing occurs server-side, so it does not directly impact your WordPress site’s frontend loading speed. Generation takes roughly real-time duration for long texts, though short phrases may take a few seconds. If your server queues requests during high load, initial audio delivery to the user may be delayed slightly until synthesis completes.

How do I handle errors?

Check the HTTP status code from the API response. Failed requests are free and return a charge refund. Implement retry logic for transient errors like 429 (rate limit exceeded). Ensure your code handles cases where the input text exceeds 4096 characters by splitting it.

Can I customize the audio player?

Yes. You receive a standard audio file (mp3, wav, opus, flac, or pcm) via the API response. Since VerbaFlow provides no proprietary player or WordPress plugin, you can embed the audio using any HTML5 player or WordPress block. You retain full control over styling, controls, and placement within your blog layout.

What happens if the API is down?

Requests fail if the API is unavailable. We do not offer an SLA or uptime guarantee, so you should implement fallback logic in your WordPress theme or plugin. You might display a static message or retry the request after a delay until the service is restored.

Do I need to pay for hosting?

Yes, you need hosting for your WordPress site and potentially for the server-side script that calls the API. The API billing is separate, based on characters processed ($0.01 per 1,000 characters). Your hosting costs are independent of our service.

Is the code open source?

The API is a proprietary cloud service. We do not provide an official SDK of our own or a WordPress plugin. However, you can integrate using standard HTTP libraries or the OpenAI SDK, which are open-source. The integration code you write for your WordPress site remains yours.

Can I use this for commercial blogs?

Yes. The API is suitable for commercial use. Generated audio is returned in the response and not stored. Input text is used only to produce the audio and is not used for training. There are no restrictions on using the audio for commercial blogs, newsletters, or digital content, provided you pay for the characters used.

How do I monitor costs?

Monitor costs via your dashboard at /get-api-key/, which displays your balance, trial status, characters left, usage, and a ready curl example. Billing is character-based ($0.01 per 1,000 characters). Failed requests are free, so you only pay for successful synthesis. This transparency allows you to track spending accurately based on actual usage without hidden fees or monthly overhead.

What if I switch themes?

Switching WordPress themes does not affect the API integration if the logic is in a custom plugin or functions.php. If the audio player is embedded via theme-specific widgets or blocks, you may need to reconfigure the player’s appearance. The API key and backend integration remain unchanged.

Prerequisites for Integration

Sound wave illustration for: Prerequisites for Integration

To begin integration, secure an API key by visiting the /get-api-key/ page. You may sign up using Google, which includes a $0.50 free trial credit valid for 7 days, or via email and password, which starts without trial credit. This key authenticates all subsequent requests to the TTS endpoint.

API Key Acquisition

Accounts created with Google receive immediate trial credit, while email-based accounts start with zero balance. Generate your key to enable character-based billing at $10 per million characters. Ensure you store the key securely, as it authorizes all API calls until replaced.

  • Sign up via Google for instant trial credit
  • Email/password accounts start with zero balance
  • One active key per account

WordPress Admin Access

You need administrative privileges to install custom plugins or modify theme files. This access allows you to enqueue the audio player scripts and register the necessary shortcodes for content insertion.

Developer Console Access

Access the developer console to monitor your character usage and balance. The console provides a ready curl example and displays your current key status, helping you track consumption against your budget.

Retrieving Audio via API

Sound wave illustration for: Retrieving Audio via API

Integrating VerbaFlow into WordPress requires sending text to the speech endpoint and receiving a complete audio file. The API accepts a JSON body with the model, input text, voice selection, and optional parameters like speed or language. Requests are processed sequentially, so generation may queue under load.

Upon successful synthesis, the API returns the audio file directly in the response body. Failed requests return a JSON error object and incur no charge, ensuring that billing only reflects successful generations. Developers must handle the response to store the audio asset for WordPress use.

Constructing the Request

Send a POST request to https://api.999gameslot.com/v1/audio/speech with a JSON body. Include the model (tts-1 or tts-1-hd), input text (up to 4096 characters), and voice preset. Use your Bearer token in the Authorization header.

  • Endpoint: POST /v1/audio/speech
  • Auth: Bearer <key>
  • Body: model, input, voice, response_format, speed, language

Handling JSON Responses

The API returns a JSON object containing the audio file as binary data. If synthesis fails, a JSON error object is returned, and the request is free. Always check the HTTP status code to determine success or failure before processing the body.

Saving Audio Files

Since the response is binary data rather than a stream, you can save it immediately upon receipt. Write the response body to a file on your server, such as an MP3 or WAV file, and store the path in WordPress for playback.

Retrieving Audio via API

WordPress Plugin Development

Sound wave illustration for: WordPress Plugin Development

Developers can build a lightweight WordPress plugin to automate text-to-speech generation directly from the editor. By leveraging the standardized REST API, content teams can convert blog posts or newsletter drafts into audio files without leaving the admin dashboard. This approach ensures consistent audio output across all published articles.

Custom Plugin Structure

Organize the plugin with a main PHP file for API communication and a separate class for shortcode handling. Use a dedicated folder for assets, keeping the codebase clean and maintainable. This structure allows easy updates when the API endpoint or voice presets change.

REST API Hooks

Utilize WordPress hooks like save_post to trigger audio generation automatically when a new article is published. Pass the post content to the API endpoint, ensuring the text length stays within the 4,096-character limit per request. Handle the JSON response to extract the audio file URL.

Shortcode Implementation

Implement a shortcode such as [verba_audio] to embed generated audio players anywhere in the post content. This allows editors to manually trigger speech synthesis for specific sections, such as summaries or key takeaways, without regenerating the entire article. The shortcode can accept parameters for voice selection and speed.

Frontend Audio Player

Sound wave illustration for: Frontend Audio Player

The HTML5 audio element provides native playback for MP3, WAV, OPUS, FLAC, and PCM formats returned by the API. This eliminates the need for third-party JavaScript libraries, ensuring reliable playback across standard WordPress installations. Developers can directly bind the generated audio URL to the element's source attribute.

HTML5 Audio Element

Use the standard <audio> tag to render the response. The browser handles codec decoding for all supported formats. This ensures compatibility with existing WordPress themes and plugins without additional dependencies.

Custom Player Design

Style the audio controls using CSS to match your site’s branding. You can hide default controls and implement custom buttons for play, pause, and volume. This approach maintains a consistent visual identity across blog posts and newsletters.

Responsive Layout

Ensure the audio player scales correctly on mobile devices. Use relative units for width and padding. Test the layout on various screen sizes to guarantee usability for readers accessing content via smartphones or tablets.

Performance Optimization

Sound wave illustration for: Performance Optimization

For WordPress publishers, minimizing bandwidth costs while maintaining fast page loads is essential. By default, the API returns MP3 files, which offer an optimal balance between file size and quality. You can adjust the speed parameter between 0.25 and 4.0 to shorten audio duration, thereby reducing data transfer per request without losing intelligibility.

Caching Strategies

Since generated audio is not stored by the API, you must implement server-side or browser-side caching for repeated requests. Store the returned audio files locally on your WordPress media library or a CDN after the first successful synthesis. This eliminates redundant API calls and ensures consistent delivery times for popular blog posts or newsletters.

  • Cache audio files based on the exact input text hash.
  • Set appropriate Cache-Control headers to prevent redundant API requests.
  • Use a CDN to serve cached audio files globally.

Lazy Loading Audio

Defer the loading of audio players until they are in the viewport to preserve initial page load speed. Implement lazy loading for the HTML5 audio element so that the browser only fetches the audio file when the user interacts with the player or scrolls to it. This reduces unnecessary data usage for readers who do not consume the audio content.

Bandwidth Management

Monitor your character usage to control costs, as billing is based on character count rather than audio duration. Avoid generating high-bitrate formats like FLAC or PCM unless specific archival quality is required, as these increase storage and bandwidth overhead. Regularly review your usage dashboard to identify high-volume posts and optimize text length to stay within budget limits.

Error Handling in WordPress

Sound wave illustration for: Error Handling in WordPress

WordPress sites must gracefully handle API failures to prevent broken user experiences. The most common failure state is a 429 Too Many Requests response, indicating that the per-key rate limit of 60 requests per minute has been exceeded. For new accounts without an initial top-up, this limit is stricter at 10 requests per minute.

Other failure states include invalid authentication or unsupported voice codes. When a synthesis request fails, the API returns a specific error code. Your plugin should check these codes before attempting to render the audio player, ensuring that transient errors do not permanently break content delivery.

API Failure States

The 429 status code is critical for managing rate limits. New accounts start with a 10 requests per minute limit, which increases to 60 after the first top-up. Ignoring this distinction can lead to immediate throttling for fresh installations. Always implement exponential backoff for retry logic to respect the server's recovery window.

  • 429 Too Many Requests: Exceeds 60 req/min (or 10 req/min for new accounts).
  • 401 Unauthorized: Invalid or expired API key.
  • 400 Bad Request: Invalid parameters, such as unsupported language codes.

User Feedback Messages

Users should receive clear, non-technical messages when audio generation fails. Instead of showing "Error 429," display "Audio generation is temporarily busy. Please try again in a moment." For authentication errors, inform users that the service key is inactive. These messages should appear in the same location as the audio player to maintain context.

Logging Mechanisms

Store error details in WordPress debug logs or a custom database table. Record the timestamp, the request payload, the response status code, and the error message. This data is essential for diagnosing whether issues stem from rate limits, invalid text inputs, or network interruptions. Keep logs for billing reconciliation and support inquiries.

Error Handling in WordPress

Cost Management

Sound wave illustration for: Cost Management

Transparent character-based billing allows WordPress teams to predict audio generation costs with precision. Every request, including spaces and punctuation, counts toward the total. Failed requests incur no charge, ensuring that wasted computation does not impact your budget. This model eliminates monthly overhead and seat fees, making it ideal for variable content schedules typical in blog publishing.

Monitoring Character Usage

The dashboard provides real-time visibility into character consumption and remaining balance. Since pricing is $0.01 per 1,000 characters, you can track exactly how many blog posts or newsletter segments have been converted. This data helps content teams understand the resource cost of long-form articles versus short updates.

  • Track cumulative characters processed per key
  • View remaining balance and trial credit status
  • Monitor request success rates to avoid paying for errors

Budget Alerts

While the system does not offer automatic billing thresholds, manual monitoring via the dashboard allows teams to set internal limits. Given the $5 minimum top-up via USTRC-20, teams can plan expenditures around specific campaign launches. Regular review of the usage log ensures that unexpected spikes in newsletter volume do not deplete credits prematurely.

  • Review usage logs weekly
  • Plan top-ups around major content drops
  • Use the free trial credit for initial testing

Optimizing Text Length

Each API request supports up to 4,096 characters. To minimize latency and ensure efficient processing, split long blog posts into logical segments before sending them to the API. This approach keeps individual requests within limits and allows for better control over audio file sizes. Combining segments afterward reduces the number of API calls, streamlining the workflow for high-volume content teams.

Security Considerations

Sound wave illustration for: Security Considerations

Security for WordPress deployments centers on protecting the single active API key and managing access limits. The system issues one active key per account, which stops immediately upon issuing a new one via the /get-api-key/ dashboard. This design simplifies key rotation without legacy token conflicts.

Key Protection

Store the Bearer token in wp-config.php or environment variables, never in public JavaScript. Regenerate keys via the dashboard to instantly invalidate the previous token. This ensures that if a key is exposed, it ceases to function immediately.

  • Use environment variables for key storage.
  • Regenerate keys to instantly invalidate old tokens.

HTTPS Enforcement

Enforce HTTPS for all API calls to https://api.999gameslot.com/v1. This prevents man-in-the-middle attacks where the Bearer token or input text could be intercepted during transmission between the WordPress server and the API endpoint.

Rate Limit Monitoring

The API enforces a limit of 60 requests per minute per key. Exceeding this may delay processing. Monitor usage via the dashboard to avoid service interruptions, especially during high-traffic newsletter deployments or bulk blog post audio generation.

  • Limit: 60 requests/minute.
  • Monitor via dashboard.

Testing the Integration

Sound wave illustration for: Testing the Integration

Verify the integration by confirming that the API endpoint responds correctly to local requests. Ensure the WordPress environment correctly passes the authentication header and receives valid audio files.

Local Development Setup

Configure your local environment to mimic the production API base URL. Use tools like Postman or cURL to send sample text payloads to the local server, ensuring the JSON body matches the required structure for tts-1 models.

  • Set up a local WordPress instance with the custom plugin active.
  • Verify API key authentication in local environment variables.
  • Test character count limits locally before live deployment.

Live Site Testing

Deploy the plugin to a staging or live WordPress environment. Generate audio for blog posts and verify that the audio files are saved correctly and accessible via the frontend player.

  • Test with various voice presets (e.g., aria, felix).
  • Verify speed adjustments (0.25–4.0) function as expected.
  • Check that failed requests do not incur character charges.

Cross-browser Verification

Ensure the HTML5 audio element renders consistently across Chrome, Firefox, Safari, and Edge. Verify that the responsive layout adapts correctly to different screen sizes without breaking the audio player controls.

  • Test audio playback in Chrome and Firefox.
  • Verify responsive behavior on mobile devices.
  • Check accessibility compliance for audio controls.

Maintenance and Updates

Sound wave illustration for: Maintenance and Updates

This section covers maintenance and updates for the API integration.

It discusses API version changes, voice updates, and bug fixes.

API Version Changes

Monitor our documentation for any endpoint updates.

Adjust your base URL if the API structure shifts.

Ensure your integration handles the latest JSON responses.

  • Check /docs/ for updates
  • Update base_url if needed

Voice Updates

The eight voice presets are fixed based on licensed recordings.

No new voices or cloning features will be added.

Existing voices remain consistent for your content.

  • Aria, Nova, Luna, Sage, Felix, Milo, Atlas, Orion

Bug Fixes

Report issues via email support.

We resolve synthesis errors and latency issues.

Updates are applied to the backend infrastructure.

  • Email support only
Maintenance and Updates

Support Resources

Sound wave illustration for: Support Resources

Access the technical documentation at /docs/ for detailed endpoint specifications, request examples, and integration guides. The /pricing/ page provides transparent character-based billing details, while the /about/ page outlines our operational scope and data handling practices.

Documentation Links

The official documentation covers all REST API endpoints, including voice selection and format options. It includes ready-to-use cURL examples and SDK configuration instructions for changing the base URL.

Email Contact

All support inquiries are handled exclusively via email. There is no live chat or phone support available. Please include your API key and a description of the issue in your message for faster resolution.

Community Forums

Currently, we do not host a public community forum. Users are encouraged to refer to the documentation or contact support directly for assistance with integration or billing questions.

Listen to the 8 voices

Each sample below was generated by this API from the same sentence. Crafting compelling blog posts for WordPress helps content creators connect deeply with their audience and build lasting engagement.

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. LibriVox public-domain audiobooks
  3. Tether (USDT)
  4. LibriTTS-R paper (arXiv 2305.18802)
  5. openai-python on GitHub
  6. LibriTTS-R corpus (OpenSLR 141)
  7. openai-node on GitHub
  8. W3C WAI: making audio and video accessible
  9. FFmpeg documentation
  10. Creative Commons Attribution 4.0
  11. Python documentation
  12. curl documentation

More on this site