Falvia AI API

Natural Sinhala, Tamil and 30+ language voices, songs, pictures and videos — in your own app, website or bot.

Get an API key

1. Get a key

Sign in, open Account centre → Developer API and create a key. Calls use the credits of that account (the same prices as the website). Keep the key secret — use it only from your server, never in a web page.

2. Start a job

Send a POST to /api/generate.php with the key in the Authorization header. Fields are normal form fields; files are uploads.

curl https://falvia.calcreto.com/api/generate.php \
  -H "Authorization: Bearer lum_your_key_here" \
  -F mode=voice -F engine=gemini -F voice=Kore -F language=si \
  -F text="ආයුබෝවන්! Falvia AI වෙත සාදරයෙන් පිළිගනිමු."

Answer: {"id": "abc123…", "user": {"credits": {...}}}

3. Wait for the result

curl https://falvia.calcreto.com/api/status.php?id=abc123…

Check every 3–5 seconds. status is starting, processing, succeeded or failed. When it succeeds, video is the link to the file (audio, picture or video). Failed jobs give the credits back automatically.

What you can make

modeMain fields
voicetext, language (si, ta, en, hi…), engine (gemini for Sinhala; eleven for others), voice, speed
songprompt (style), lyrics or auto_lyrics=yes, song_lang (Sinhala, Tamil…), instrumental=yes
imagetask = create, poster, thumbnail, edit, product, restore, logo, headshot; prompt; headline; aspect; image (file)
videoprompt, duration (5 or 10), aspect (16:9, 9:16, 1:1), image (optional start frame)
sttmedia (audio/video file), language — returns text and timed segments
bgremove, upscaleimage (file)
lipsyncvideo + audio files, consent=yes (max 60 s)
sfxprompt, seconds

Your balance

curl https://falvia.calcreto.com/api/auth.php?action=me -H "Authorization: Bearer lum_your_key_here"

Limits & errors

Example (Node.js)

const KEY = process.env.FALVIA_KEY, BASE = "https://falvia.calcreto.com/api";
const fd = new FormData();
fd.append("mode", "song"); fd.append("prompt", "joyful Tamil birthday song, kuthu beat");
fd.append("auto_lyrics", "yes"); fd.append("song_lang", "Tamil");
const { id } = await (await fetch(BASE + "/generate.php", { method: "POST", body: fd, headers: { Authorization: "Bearer " + KEY } })).json();
let s; do { await new Promise(r => setTimeout(r, 4000)); s = await (await fetch(BASE + "/status.php?id=" + id)).json(); }
while (!["succeeded", "failed"].includes(s.status));
console.log(s.video || s.error);

Need higher limits or invoicing for your company? Contact us.