BlockRun

Text-to-Speech & Sound Effects API

Ultra-realistic voice synthesis and cinematic sound effects powered by ElevenLabs, behind x402. Pay per call in USDC — no ElevenLabs subscription, no API keys.

Text-to-speech is billed per input character, so the price is quoted up front in the 402 challenge and settlement only happens after the audio is generated. A failed generation is never charged.

Endpoints

POST https://blockrun.ai/api/v1/audio/speech          # text-to-speech
POST https://blockrun.ai/api/v1/audio/sound-effects   # sound effect generation
GET  https://blockrun.ai/api/v1/audio/voices           # list voices (free)

Text-to-Speech

Request

{
  "model": "elevenlabs/flash-v2.5",
  "input": "Hello from BlockRun. Pay per call, no subscription.",
  "voice": "sarah",
  "response_format": "mp3"
}

Parameters

ParameterTypeRequiredDescription
modelstringNoModel ID (default: elevenlabs/flash-v2.5)
inputstringYesText to synthesize
voicestringNoVoice alias (e.g. sarah, george) or raw ElevenLabs voice_id (default: sarah)
response_formatstringNomp3 (default), opus, pcm, wav
speednumberNoPlayback speed 0.7–1.2

Models

Model IDPriceMax inputBest for
elevenlabs/flash-v2.5$0.05 / 1k chars40,000Real-time voice agents (~75ms)
elevenlabs/turbo-v2.5$0.05 / 1k chars40,000Balanced quality/latency
elevenlabs/multilingual-v2$0.10 / 1k chars10,000Studio-grade narration
elevenlabs/v3$0.10 / 1k chars5,000Maximum expressiveness

Price = (characters / 1000) × model rate, plus a 5% platform fee, minimum $0.001 per request.

Response

{
  "created": 1733443200,
  "model": "elevenlabs/flash-v2.5",
  "data": [
    {
      "url": "https://blockrun.ai/api/media/audios/2026/06/05/....mp3",
      "format": "mp3",
      "characters": 51
    }
  ]
}

Sound Effects

POST /api/v1/audio/sound-effects
{
  "text": "thunderclap with heavy rain",
  "duration_seconds": 5
}
ParameterTypeRequiredDescription
textstringYesDescription of the sound effect
duration_secondsnumberNo0.5–22s (auto if omitted)
prompt_influencenumberNo0–1, how strictly to follow the prompt
response_formatstringNomp3 (default), opus, pcm, wav

Flat price: $0.05 / generation (+5% fee).

Voices (free)

GET /api/v1/audio/voices

Returns the available voices with their voice_id, name, and alias (if mapped). Pass the alias or voice_id as the voice field to /v1/audio/speech.

Notes

  • Audio is stored by BlockRun and returned as a permanent hosted URL.
  • The price is recomputed from the request body on the paid call, so a payment signed for short text cannot be reused to synthesize longer text.
  • Settlement happens only after successful synthesis; upstream failures are not charged.