Skip to main content

OpenAI Text-to-Speech

Generate natural-sounding speech from text using OpenAI's text-to-speech models.

Supported Models

  • tts-1: Standard quality, faster generation
  • tts-1-hd: High quality, slower generation

Parameters

ParameterTypeRequiredDescription
textstringYesText to convert to speech (max 4096 characters)
voicestringYesVoice to use for speech generation
response_formatstringNoAudio format (default: mp3)
speednumberNoSpeech speed (0.25 to 4.0, default: 1.0)

Voice Options

  • alloy - Neutral, balanced voice
  • echo - Clear, expressive voice
  • fable - Warm, engaging voice
  • onyx - Deep, authoritative voice
  • nova - Bright, energetic voice
  • shimmer - Gentle, soothing voice

Response Format Options

  • mp3 - MP3 audio format (default)
  • opus - Opus audio format
  • aac - AAC audio format
  • flac - FLAC audio format
  • wav - WAV audio format
  • pcm - PCM audio format

Request Example

API Playground

https://api.1min.ai/api/features

Generated cURL Command:

curl -X POST "https://api.1min.ai/api/features" \
-H "API-KEY: <your-api-key>" \
-H "Content-Type: application/json" \
-d '{
"type": "TEXT_TO_SPEECH",
"model": "tts-1",
"conversationId": "TEXT_TO_SPEECH",
"promptObject": {
"text": "Hello, this is a sample text to speech conversion using OpenAI.",
"voice": "alloy",
"response_format": "mp3",
"speed": 1
}
}'

Response Format

The API returns an audio file in the specified format. The response will be a binary audio stream.

{}