AI

Text-to-speech synthesis

Convert text to speech using OpenAI TTS. Returns base64-encoded audio — decode with base64 -d > output.<format>. Billed per character under ai:speech. Unknown model values fall back to tts-1.

post/api/v1/ai/speech

Request

  • Base URL
    https://core.blink.new
  • URL
    https://core.blink.new/api/v1/ai/speech
  • Auth
    • HTTP bearer
    • or HTTP bearer

Request body

textstring required

Text to synthesize (max 4 096 characters)

voice'alloy' | 'echo' | 'fable' | 'onyx' | 'nova' | 'shimmer'

Voice.

model'tts-1' | 'tts-1-hd'

TTS model (tts-1 = fast, tts-1-hd = high quality)

format'mp3' | 'opus' | 'aac' | 'flac' | 'wav' | 'pcm'

Output format.

speednumber

Speech speed multiplier (default 1.0)

Example request

{
  "text": "Hello! This is a test of the Blink speech API.",
  "speed": 1
}

Response

Speech generated — returns base64-encoded audio

audio_base64string

Base64-encoded audio data. Decode and save as output.<format>.

formatstring

Audio format of the returned data

voicestring

Voice used for synthesis

modelstring

TTS model used

charactersinteger

Number of input characters processed

Example response

{
  "format": "mp3",
  "voice": "alloy",
  "model": "tts-1",
  "characters": 47
}

Changes

No recorded changes to this operation across all 1 revision of this API.