Skip to main content
POST
Generate Text-to-Speech

Authorizations

x-api-key
string
header
required

API key for authentication. Get yours at https://easy-peasy.ai/settings/api

Headers

x-api-key
string
required

Your API key

Body

application/json
voiceID
string
required

Voice ID to use for generation (get IDs from the Get TTS Voices endpoint)

Example:

"21m00Tcm4TlvDq8ikWAM"

text
string
required

The text to convert to speech

Example:

"Hello! This is a test of the text-to-speech API."

Response

Successfully generated audio

url
string<uri>

Publicly accessible URL of the generated audio file (MP3)

Example:

"https://media.easy-peasy.ai/tts/27feb2bb-aeb4-4a83-9fb6-8f3f2a15885e/6848fb55-48e7-455d-bd56-3cb5ce2cd81e.mp3"

uuid
string<uuid>

ID of the audio

Example:

"550e8400-e29b-41d4-a716-446655440000"

used_characters
integer

Word count of the text (used for billing)

Example:

10

status
enum<string>

Status of the speech generation

Available options:
completed
Example:

"completed"