Loading API documentation
Generate speech from text using Seed TTS 3.0.
The client provides a convenient way to interact with the model API.
npm install --save @fal-ai/clientSet FAL_KEY as an environment variable in your runtime.
export FAL_KEY="YOUR_API_KEY"The client API handles the API submit protocol. It will handle the request status updates and return the result when the request is completed.
import { fal } from "@fal-ai/client";
const result = await fal.subscribe("bytedance/seed-tts/v3", {
input: {
text: "Hello, this is a test of Seed TTS 3.0 speech synthesis."
},
logs: true,
onQueueUpdate: (update) => {
if (update.status === "IN_PROGRESS") {
update.logs.map((log) => log.message).forEach(console.log);
}
},
});
console.log(result.data);
console.log(result.requestId);The API uses an API Key for authentication. It is recommended you set the FAL_KEY environment variable in your runtime when possible.
import { fal } from "@fal-ai/client";
fal.config({
credentials: "YOUR_FAL_KEY"
});The client API provides a convenient way to submit requests to the model.
import { fal } from "@fal-ai/client";
const { request_id } = await fal.queue.submit("bytedance/seed-tts/v3", {
input: {
text: "Hello, this is a test of Seed TTS 3.0 speech synthesis."
},
webhookUrl: "https://optional.webhook.url/for/results",
});You can fetch the status of a request to check if it is completed or still in progress.
import { fal } from "@fal-ai/client";
const status = await fal.queue.status("bytedance/seed-tts/v3", {
requestId: "764cabcf-b745-4b3e-ae38-1200304cf45b",
logs: true,
});Once the request is completed, you can fetch the result. See the Output Schema for the expected result format.
import { fal } from "@fal-ai/client";
const result = await fal.queue.result("bytedance/seed-tts/v3", {
requestId: "764cabcf-b745-4b3e-ae38-1200304cf45b"
});
console.log(result.data);
console.log(result.requestId);Some attributes in the API accept file URLs as input. Whenever that's the case you can pass your own URL or a Base64 data URI.
You can pass a Base64 data URI as a file input. The API will handle the file decoding for you. Keep in mind that for large files, this alternative although convenient can impact the request performance.
You can also pass your own URLs as long as they are publicly accessible. Be aware that some hosts might block cross-site requests, rate-limit, or consider the request as a bot.
We provide a convenient file storage that allows you to upload files and use them in your requests. You can upload files using the client API and use the returned URL in your requests.
import { fal } from "@fal-ai/client";
const file = new File(["Hello, World!"], "hello.txt", { type: "text/plain" });
const url = await fal.storage.upload(file);Read more about file handling in our file upload guide.
text string* requiredThe text to synthesize into speech.
voice VoiceEnumVoice to use for synthesis. The suffix is the voice's primary language code. Default value: "stokie_en"
Possible enum values: owen_en, mason_en, zendaya_en, dylan_en, kayla_en, megan_en, valentino_en, skye_en, simba_en, sharron_en, ryan_en, blair_en, sunny_en, myra_en, rory_en, marcus_en, elliot_en, stokie_en, nora_en, clark_en, tom_en, tim_en, scarlet_en, sarah_en, russell_en, ronald_en, rachel_en, elaine_en, gavin_en, colin_en, natasha_en, michael_kevin_en, chip_en, hank_en, mel_en, ivy_en, lynn_en, knightley_en, kevin_en, kate_en, josiah_en, josh_en, joker_en, joanne_en, jimmy_en, blaze_en, jenny_en, jane_en, jamie_en, jama_en, wesley_en, hayley_en, beau_en, gollum_en, godfather_en, theo_en, levi_en, desmond_en, felix_en, holly_en, alfred_en, jasper_en, harrison_en, lisa_en, grace_en, roman_en, simon_en, dean_en, peter_en, grant_en, spencer_en, doris_en, julian_en, orion_en, david_en, dacey_en, alfie_en, callum_en, john_en, bob_en, leo_en, adrian_en, zoe_en, brittney_en, brad_pitt_en, bill_en, jones_en, margaret_en, charlotte_en, reagan_en, mpho_en, naomi_en, allison_en, alex_en, alberto_en, rowan_en, alice_en, shannon_en, daphne_en, imogen_en, rupert_en, nigel_en, wayne_en, selina_en, barnaby_en, tobias_en, harriet_en, elspeth_en, alistair_en, declan_en, pigsy_zh, zhuang_zhou_zh, lin_zhiya_zh, tina_zh, xiao_xue_zh, he_xiaoyu_zh, wu_zetian_zh, xiao_ya_zh, chen_wen_zh, su_wan_zh, chen_rou_zh, ah_hu_zh, maomao_zh, vivi_xi_zh, chan_ka_zh, tuanzi_zh, lin_zhixin_zh, yueyue_zh, xiao_yuan_zh, taozi_zh, gu_tian_zh, xiao_tian_zh, tang_sanzang_zh, sun_wukong_zh, sophie_zh, shi_lang_zh, sisi_zh, ye_an_zh, zi_xin_zh, lin_tong_zh, lin_jiaojiao_zh, yi_chen_zh, wen_yu_zh, su_rou_zh, chen_qing_zh, lin_qingxin_zh, nan_da_zh, zizi_zh, qing_cang_zh, qiao_ling_zh, granny_chen_zh, peppa_pig_zh, jane_foster_zh, meng_bao_zh, mizai_zh, meng_ya_zh, mei_lin_zh, yun_zhou_zh, luban_seven_zh, liu_fei_zh, liu_chang_zh, lin_xiao_zh, lin_xiaomei_zh, lin_xiaojun_zh, lingling_zh, liang_zai_zh, mianbao_zh, xiao_dong_zh, nuan_yang_zh, kai_yang_zh, kai_xin_zh, kai_le_zh, ji_xin_zh, ji_mei_zh, xiao_ming_zh, jiao_yin_zh, li_huo_zh, gu_jie_zh, su_yu_zh, gu_yan_zh, gao_leng_zh, chen_jing_zh, yin_jie_zh, da_yi_zh, cancan_zh, xiao_man_zh, ling_ling_zh, wan_jun_zh, xiao_nan_zh, ayu_id, bayu_id, citra_id, dewi_id, rizky_id, prisma_id, phulia_id, kyle_id, adi_id, arif_id, ikbal_id, han_id, chloe_id, lestari_id, bima_id, gita_id, nabila_id, fajar_id, hendra_id, kirana_id, yudi_id, sri_id, sabila_id, melati_id, siti_id, stefani_id, ratna_id, mega_id, annisa_id, bella_id, sari_id, indah_id, dhara_id, aditya_id, hindun_id, putri_id, riris_id, rini_id, umar_id, safina_id, shabrina_id, shindy_id, sigit_id, oca_id, nia_id, cesna_id, ronan_id, elian_id, crew_id, celeste_id, sylvia_id, clara_id, hugo_id, jude_id, rocco_id, tita_id, vina_id, vio_id, yuni_id, zahra_id, ilham_id, andre_id, lia_id, farida_id, wulan_id, yuli_id, rosida_id, fera_id, krisna_id, cahaya_id, wahyuni_id, kezia_id, etta_id, wahyu_id, kenta_ja, yusuke_ja, takumi_ja, oka_ja, saki_ja, keikotagawa_ja, maika_ja, erikoh_ja, nanase_ja, maeda_ja, nao_ja, hiro_ja, emi_ja, mana_ja, keita_ja, haruka_ja, shota_ja, kaori_ja, mayu_ja, natsuki_ja, rina_ja, yuto_ja, chiaki_ja, nana_ja, moe_ja, kanon_ja, yuka_ja, ryota_ja, kaito_ja, yosuke_ja, sakura_ja, ami_ja, hinata_ja, mei_ja, nanami_ja, tomomi_ja, yuko_ja, reiko_ja, miharu_ja, shirou_ja, minimi_ja, ken_ja, lily_ja, hana_ja, aoi_ja, poppy_ja, bonnie_ja, ayumi_ja, nanri_ja, jiwoo_ko, soyeon_ko, eunji_ko, minji_ko, shane_ko, hyunwoo_ko, jaeho_ko, minho_ko, lim_ko, kyoung_ko, kangyoo_ko, seojin_ko, jinwoo_ko, momo_ko, jay_ko, in_hwan_ko, haneul_ko, nari_ko, yeonhee_ko, miae_ko, amir_ms, qis_ms, haziq_ms, naim_ms, farah_ms, nurul_ms, izzah_ms, aisyah_ms, hazeem_ms, hashim_ms, ham_ms, syahira_ms, aiman_ms, suraya_ms, syafiq_ms, nadia_ms, imran_ms, wani_ms, asira_ms, shiilla_ms, hasrul_ms, malay_ms, chatri_th, tess_th, paran_th, nopparat_th, natcha_th, misa_th, pim_th, kanya_th, elle_th, duang_th, csbusaba_th, cake_th, phoebe_th, lydia_th, mildred_th, valentina_th, zara_th, iris_th, valeria_th, angpao_th, jonathan_fil, hervie_fil, ed_fil, jeamafely_fil, annika_fil, wumg_vi, wu_vi, ruan_vi, phuong_vi, partner_vi, huy_vi, linh_vi, ling_vi, khanh_vi, hong_vi, trang_vi, ngoc_vi, duc_vi, khoa_vi, sana_ur, yilmaz_tr, ananya_te, kiran_te, aditi_mr, hetal_gu, meera_gu, sven_de, sammy_de, stella_de, anke_de, ingrid_de, annie_de, jessica_de, alvaro_es, romina_es, nico_es, mateo_es, javier_es, rafa_es, lucia_es, mariano_es, paula_es, marisol_es, guillem_es, francisc_es, emilio_es, andres_es, dani_es, tomas_es, gracie_es, pablo_es, ignacio_es, angel_es, carmen_es, beatriz_es, gabriel_es, rocio_es, pilar_es, usseau_fr, mathieu_fr, elodie_fr, antoine_fr, julien_fr, maurice_fr, camille_fr, simone_fr, laurent_fr, remi_fr, cedric_fr, luca_it, matteo_it, enzo_it, lorenzo_it, ksenia_ru, silas_ru, pavel_ru, dmitri_ru, irinae_ru, oksana_ru, yuri_ru, alina_ru, irina_ru, ben_ru, tamer_ru, svetlana_ru, amelia_ru, grigori_ru, vadim_ru, vera_ru, anton_ru, amani_sw, zuri_sw, neema_sw, zawadi_sw, migu_es_mx, marcelo_es_mx, leslie_es_mx, derek_es_mx, gomez_es_mx, felipe_es_mx, renata_es_mx, freya_es_mx, rosa_es_mx, lucy_es_mx, marcos_es_mx, diego_es_mx, irene_es_mx, cstania_es_mx, leon_es_mx, mariana_es_mx, gustavo_es_mx, cesar_es_mx, joaquin_es_mx, itzel_es_mx, rosario_es_mx, samuel_es_mx, karen_es_mx, kimberly_es_mx, mary_es_mx, nancy_es_mx, rael_pt_br, toby_pt_br, camila_pt_br, mari_pt_br, arthur_pt_br, sofia_pt_br, emma_pt_br, lola_pt_br, elena_pt_br, diana_pt_br, miles_pt_br, vincent_pt_br, walter_pt_br, sam_pt_br, ana_pt_br, bruna_pt_br, rafael_pt_br, thiago_pt_br, malena_es_ar, youssef_ar, rmya_ar, fatma_ar, dina_ar, karim_ar, yasmin_ar, rania_ar
language EnumLanguage or dialect to read the text in. A dialect code also selects the accent, e.g. 'zh-CN-x-sichuan'. Leave unset for automatic language detection.
Possible enum values: af, am, ar, as, ast, az, be, bg, bn, bs, ca, ceb, ckb, cs, cy, da, de, el, en, en-GB, es, es-MX, et, fa, fi, fil, fr, fuv, gl, gu, ha, he, hi, hr, hu, hy, id, ig, is, it, ja, jv, ka, kam, kea, kk, km, kn, ko, ky, lb, lg, ln, lo, lt, luo, lv, mi, mk, ml, mn, mr, ms, mt, my, ne, nl, no, nso, ny, oc, ory, pa, pl, ps, pt, pt-BR, ro, ru, sd, sk, sl, sn, sq, sr, sv, sw, ta, te, tg, th, tr, uk, umb, ur, uz, vi, wo, xh, yo, yue, zh, zh-CN-x-beijing, zh-CN-x-changsha, zh-CN-x-dongbei, zh-CN-x-henan, zh-CN-x-hubei, zh-CN-x-kejia, zh-CN-x-minnan, zh-CN-x-nanchang, zh-CN-x-nanjing, zh-CN-x-shaanxi, zh-CN-x-shandong, zh-CN-x-shanghai, zh-CN-x-sichuan, zh-CN-x-taiwan, zh-CN-x-tangshan, zh-CN-x-tianjin, zu
voice_instruction stringOptional natural-language instruction that steers the delivery (tone, emotion, pace), e.g. 'Warm and natural'. It is not spoken aloud.
speed floatSpeech speed multiplier. 1.0 is normal speed. Default value: 1
volume floatVolume multiplier. 1.0 is normal volume. Default value: 1
pitch integerPitch shift in semitones. 0 is normal pitch, -12 lowers by one octave, 12 raises by one octave.
output_format OutputFormatEnumOutput audio format. 'mp3' returns MP3 audio; 'opus' returns Opus audio in an Ogg container. Default value: "mp3"
Possible enum values: mp3, opus
sample_rate EnumSample rate of the output audio in Hz. Defaults to 24000 for mp3. Opus output is always 48000 Hz.
Possible enum values: 8000, 16000, 22050, 24000, 32000, 44100, 48000
{
"text": "Hello, this is a test of Seed TTS 3.0 speech synthesis.",
"voice": "stokie_en",
"voice_instruction": "Warm and natural",
"speed": 1,
"volume": 1,
"output_format": "mp3"
}The generated audio file.
{
"audio": {
"url": "",
"content_type": "image/png",
"file_name": "z9RV14K95DvU.png",
"file_size": 4404019
}
}url string* requiredThe URL where the file can be downloaded from.
content_type stringThe mime type of the file.
file_name stringThe name of the file. It will be auto-generated if not provided.
file_size integerThe size of the file in bytes.