Sign in to get your API key and 5000 free credits

Sign in

Make your first API call

curl -X POST -H "Content-Type: application/json" -H "X-API-Key: myapikey" -d '{"lines": ["In a small village nestled in the rolling hills of Tuscany, a young girl named Sophia lived a simple life surrounded by vineyards and olive groves.", "She spent her days helping her mother with the household chores and tending to their family vineyard, where she learned the art of winemaking from her father.", "One day, while out picking grapes in the early morning sun, Sophia stumbled upon a hidden path she had never seen before, winding its way up the hillside like a snake.", "Curiosity getting the better of her, Sophia decided to follow the path, which led her to a small clearing surrounded by ancient stone walls and towering cypress trees.", "In the center of the clearing stood an old, gnarled tree, its branches twisted and tangled in a way that seemed almost... magical.", "As Sophia approached the tree she felt a strange sensation wash over her, like a sudden jolt of electricity had passed through her body, and suddenly she knew that this was no ordinary tree."] }' https://ttsapi.online/v1/job

Get the status of a job

curl -H "Content-Type: application/json" -H "X-API-Key: myapikey" https://ttsapi.online/v1/job/93c949c9-b736-405f-9b0f-9d1338f453d1

Language support

Supported languages: 'en-us', 'fr-fr', 'de', 'ja', 'ko', 'cmn'

curl -X POST -H "Content-Type: application/json" -H "X-API-Key: myapikey" -d '{ "languageIsoCode": "ja", "lines": ["森の奥深く、小さな村が静かに佇んでいた。","ある日、少年タケルは古い井戸のそばで奇妙な光る石を見つけた。","それを手に取ると、突然、村の空が黄金色に輝き、不思議な声が響いた。","「選ばれし者よ、封印された扉を開けよ。」","タケルは驚きながらも、石が指し示す方向へと足を踏み出した。","深い洞窟の奥で、彼は古代の扉を見つけ、恐る恐る開けた。","すると、中には時を超えた賢者が眠っており、ゆっくりと目を開けた。","「お前が来るのを待っていた。」"]}' https://ttsapi.online/v1/job

Get the audio file

The api key can be passed as a query parameter or in the header

curl -H "X-API-Key: myapikey" https://ttsapi.online/v1/job/93c949c9-b736-405f-9b0f-9d1338f453d1/result > output.mp3

wget 'https://ttsapi.online/v1/job/93c949c9-b736-405f-9b0f-9d1338f453d1/result?api_key=myapikey' -O output.mp3

Different output formats supported

Supported formats: 'audio/mpeg', 'audio/wav', 'audio/mp3', 'audio/ogg', 'audio/flac', 'audio/m4a', 'audio/aac', 'audio/webm'

curl -X POST -H "Content-Type: application/json" -H "X-API-Key: myapikey" -d '{ "languageIsoCode": "en-us", "lines": ["Flac is a lossless audio format that can be used for high-quality audio playback.", "It is a popular choice for audio storage and transmission, and is often used in professional audio applications."], "mimeType": "audio/flac" }' https://ttsapi.online/v1/job

Voice cloning

Provide a 10-30 second sample audio clip in base64

curl -X POST -H "Content-Type: application/json" -H "X-API-Key: myapikey" -d '{ "speakerAudio": "$base64audio", "lines": ["I can mimic any speaker"] }' https://ttsapi.online/v1/job

Constant seed may be passed

The seed is a random number that is used to generate the same audio for the same input

curl -X POST -H "Content-Type: application/json" -H "X-API-Key: myapikey" -d '{ "seed": 42, "lines": ["Hello, world!"] }' https://ttsapi.online/v1/job