Skip to main content

Make Your First API Request

Once you're familiar with generating voices through the dashboard, you can start using the Audixa API to integrate text-to-speech into your own applications and workflows.

This section shows you how to make your first programmatic request using the API.


API Endpoint

To generate speech, send a POST request to the following endpoint:

POST https://api.audixa.ai/v2/tts

Required Headers

x-api-key: YOUR_API_KEY
Content-Type: application/json

Replace YOUR_API_KEY with your actual API key from the Dashboard.

tip

How To Get Your API Key

  1. Log in to your Dashboard.
  2. Navigate to the API Keys section.
  3. Click Regenerate.
  4. Copy your private API key.
warning

Do Not Expose API Key in Frontend Code Your API key contains sensitive credentials that can be abused if exposed. Always keep it securely stored and accessed from the backend/server. Exposing it in client-side code (HTML, JavaScript) may lead to:

  • Unauthorized usage
  • Data theft
  • Unexpected charges or bans
  • Security vulnerabilities

Best Practice: Route all API requests through your backend to protect the key.


Basic Example Request Body

{
"text": "Welcome to Audixa AI, your affordable text-to-speech solution.",
"voice": "am_Ethan",
"model":"base",
"speed": 1
}
  • text - The content you want to convert to speech.
  • voice - Voice ID (see Voice Library for available voices).
  • speed - Speed of the speech. Range: 0.5 to 2
info

To access additional settings and learn more about the API, please refer to the API Reference.


Code Examples

curl -X POST https://api.audixa.ai/v2/tts \
-H "x-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"text": "Welcome to Audixa AI, your affordable text-to-speech solution.",
"voice": "am_Ethan",
"model":"base",
"speed": 1
}'

Check Generation Status

Once you've made a request, the API will return a response containing a generation_id (if the request was successful).

You can check the generation status in two ways:

  1. From the Dashboard
    Visit your Dashboard to see the latest requests and download audio once ready.

  2. Using the API
    Use the /status endpoint to programmatically check the status of a request using the request_id.

For details on how to use the status endpoint, see the API Reference → Status Endpoint.