x402

Voz, música e efeito sonoro

Fala no formato da OpenAI, música e efeito sonoro, com o arquivo na resposta.

3 rotas. Sem pagamento, cada uma responde 402 com o preço do corpo enviado; como pagar e buscar o resultado está em x402.

speech

POST /api/x402/v1/audio/speech · dinâmico, exato no 402

OpenAI-compatible text to speech: send input and get the audio file back (mp3 by default). Voices from 11 engines; the price follows the length of the text, quoted in the 402.

CampoTipoObrigatórioDescrição
inputstringsimThe text to speak, up to 4096 characters.
modelstringVoice engine (default tts-elevenlabs-turbo-v2-5): tts-elevenlabs-turbo-v2-5, tts-minimax-speech-02-hd, tts-gemini-3-1-flash, tts-kokoro, tts-xai-v1, tts-inworld-1-5-max, tts-chatterbox-hd, tts-orpheus, tts-gradium-v1, tts-qwen3-1-7b, tts-qwen3-0-6b.
voicestringVoice name of the engine.
response_formatstringmp3, opus, aac, flac, wav, pcm (default mp3).
speednumber0.25 to 4.
json
{
  "input": "Welcome to the house. Pay per call, no account needed."
}
  • 200: OpenAI-compatible text to speech: send input and get the audio file back (mp3 by default). Voices from 11 engines; the price follows the length of the text, quoted in the 402.
  • 402: Payment Required

sound-effects

POST /api/x402/v1/audio/sound-effects · US$ 0,03, fixo

A sound effect from a description (ElevenLabs Sound Effects v2), up to 10 s. Returns the file URL on the house CDN.

CampoTipoObrigatórioDescrição
promptstringsimThe sound you want, up to 1000 characters.
secondsinteger1 to 10 (default: the engine decides).
loopbooleanMake it loop seamlessly.
json
{
  "prompt": "heavy wooden door creaking open in a stone castle hall",
  "seconds": 4
}
  • 200: A sound effect from a description (ElevenLabs Sound Effects v2), up to 10 s. Returns the file URL on the house CDN.
  • 402: Payment Required

music

POST /api/x402/v1/audio/music · US$ 0,09, fixo

A full music track from a description of style, mood and instruments, with optional lyrics (Google Lyria 3 Pro). Returns the file URL on the house CDN.

CampoTipoObrigatórioDescrição
promptstringsimStyle, mood, tempo and instruments, up to 5000 characters.
lyricsstringLyrics to sing, up to 4096 characters. Leave out for the engine to decide.
json
{
  "prompt": "warm lo-fi hip hop, dusty vinyl drums, mellow Rhodes chords, rain outside, 80 bpm"
}
  • 200: A full music track from a description of style, mood and instruments, with optional lyrics (Google Lyria 3 Pro). Returns the file URL on the house CDN.
  • 402: Payment Required