Skip to main content
Audixa does not require or publish a Node.js SDK package. Node.js 18 and later include fetch, so you can call the REST API directly and keep the request and polling behavior visible in your application.

Requirements

  • Node.js 18 or later.
  • An Audixa API key created in Developers.
  • A minimum $10 top-up or an active subscription.
Set the key in your server environment:
This is server-side code. Do not embed an API key in JavaScript delivered to a browser.

Quick Start

JavaScript (ES module)

Request Contract

The initial POST response normally has status IN_QUEUE. Poll the same /tts endpoint with generation_id; do not treat the create response as completed audio.

TypeScript Types

These local interfaces describe the REST fields used by the example. They are not imported from an Audixa package.

List Compatible Voices

Error Handling

Check the HTTP status before consuming a success response: FAILED is an asynchronous generation status, not necessarily an HTTP error. Always handle both transport errors and terminal generation statuses.

Cancellation and Timeouts

Use AbortController for a request-level timeout chosen by your application:
Aborting a polling request does not cancel a generation already accepted by the API.