Skip to main content
POST
/
api
/
v1
/
ai
/
tts
Convert text to speech
curl --request POST \
  --url https://api.oryntai.xyz/api/v1/ai/tts \
  --header 'Content-Type: application/json' \
  --header 'X-Network: <x-network>' \
  --data '
{
  "model": "gpt-voice-1",
  "text": "Hello world",
  "voice": "alloy",
  "options": {}
}
'
{
  "model": "gpt-voice-1",
  "audioUrl": "https://example.com/audio.mp3"
}

Headers

X-Network
string
required

Blockchain network to use (e.g., solana, solana-devnet, base, polygon)

X-PAYMENT
string

On-chain payment proof for HTTP 402 requests

Body

application/json
model
string
required

TTS model to use

Example:

"gpt-voice-1"

text
string
required

Text to convert to speech

Example:

"Hello world"

voice
string

Voice style or name

Example:

"alloy"

options
object

Provider-specific options

Response

Generated speech/audio file