Developers

Tonefy API

Make finished short videos from your own code. Send an idea (we write the script) or your own script, and get back a vertical, square or wide video with a voiceover, stock footage cut every couple of seconds, captions and music - the same videos the Tonefy app makes.

Part of the Pro and Creator plans. Videos use the same credits as the app: 1 credit per started minute, taken only when a video is finished.

1. Get a key

Open your Profile, find Tonefy API and create a key. Copy it straight away - it is shown once. You can have up to 3 keys and revoke any of them at any time. Keep keys on your server; never put one in a web page or mobile app.

Send the key with every request:

Authorization: Bearer tfy_live_...

All endpoints live at https://api.fitlifesolutions.site/v1 and speak JSON.

2. Make a video

curl -X POST https://api.fitlifesolutions.site/v1/videos \
  -H "Authorization: Bearer $TONEFY_KEY" \
  -H "Content-Type: application/json" \
  -d '{"idea": "3 easy ways to drink more water", "voice": "edge-en-US-AriaNeural"}'

The reply comes at once, with status 202:

{ "id": "a31daf36-...", "status": "processing", "progress": 0,
  "message": "Writing the script...", "video_url": null, "script": null }
FieldRequiredWhat it does
ideaone of these twoA topic, up to 500 characters. We write a script of about 30 seconds that opens with a hook.
scriptone of these twoYour own words, up to 6000 characters, read exactly as written. Your plan's length limit applies.
voicenoA voice id from GET /v1/voices. Default gtts-us.
aspect_rationo9:16 (default), 1:1 or 16:9.
caption_stylenoclassic (default), tiktok, bold, neon, fire, purple, sticker, outline, cinematic, minimal, shadow3d or highlight.
musicnoA track id from the app's music library. Leave it out for the default bed.

3. Check on it

curl https://api.fitlifesolutions.site/v1/videos/a31daf36-... \
  -H "Authorization: Bearer $TONEFY_KEY"
{ "id": "a31daf36-...", "status": "done", "progress": 100, "message": "Video ready!",
  "video_url": "https://api.fitlifesolutions.site/videos/final-....mp4",
  "script": "Did you know your body wakes up thirsty? ..." }

status is processing, done or failed. A video usually takes 1 to 2 minutes; checking every 5 to 10 seconds is plenty. Download the file when it is done - it is kept for 30 days, like any video made on a paid plan.

Other endpoints

EndpointReturns
GET /v1/meYour plan, credits remaining and when they reset.
GET /v1/voicesEvery voice id with its name and language.

Errors

Every error has the same shape, with a sentence you can show to people:

{ "error": { "code": "content_blocked", "message": "We can't make a video from this. ..." } }
StatusCodeMeaning
400invalid_requestA field is missing or not allowed.
401invalid_keyNo key, a wrong key or a revoked key.
402not_allowedOut of credits until the date in the message, or upgrade for more.
403plan_required / not_allowedThe account is not on Pro or Creator, or the script is longer than the plan allows.
404not_foundNo video with that id on your account.
422content_blockedThe idea or script breaks our content rules (sexual, hateful, violent or dangerous content).
429rate_limitedMore than 60 requests a minute per key, or 20 videos an hour per account.

Good to know