Generate speech from your own code or workflow and direct the delivery the way you would brief a voice actor: warm, unhurried, a touch of Dublin, pick up the pace in the last line. OpenAI-compatible, one key, same credits as the app.
Available on every plan, including Free. No separate API price list.
Three things other speech APIs make you work for
A director's note, in plain English
Pass "note": "warm, unhurried" with the text and the voice follows it: emotion, pace, accent, where to breathe. No SSML, no per-sentence tuning. Works on the Ultra and Pro tiers, and emotion tags like [whispers] work inline.
OpenAI-compatible
Already calling /v1/audio/speech? Change base_url to https://api.leapfun.ai/v1, keep your SDK, and the instructions field becomes the director's note. Model names map to our tiers.
One key, shared credits
API calls spend the same credits as the app, at the same rates, with no separate API price list. Create a key in Settings, read your balance at GET /v1/usage. Every plan includes it, Free too; higher plans get higher rate limits. Commercial use of the audio starts on the Starter plan.
curl https://api.leapfun.ai/v1/tts \
-H "Authorization: Bearer lf_sk_..." \
-H "Content-Type: application/json" \
-d '{
"text": "Welcome back. We pick up right where we left off.",
"engine": "ultra",
"voice": "aurora",
"note": "warm, unhurried"
}' \
--output welcome.mp3
The body is MP3 bytes. The headers tell you what it cost: X-Job-Id, X-Credits-Used, X-Engine, and X-RateLimit-Limit / -Remaining / -Reset.
speak.py · pip install openai
from openai import OpenAI
client = OpenAI(base_url="https://api.leapfun.ai/v1", api_key="lf_sk_...")
speech = client.audio.speech.create(
model="gpt-4o-mini-tts", # runs on Leap Ultra
voice="aurora",
input="Welcome back. We pick up right where we left off.",
instructions="warm, unhurried", # the director's note
)
speech.write_to_file("welcome.mp3")
The official openai package, unchanged. Only base_url and the key are ours.
speak.mjs · npm install openai
import OpenAI from "openai";
import { writeFile } from "node:fs/promises";
const client = new OpenAI({ baseURL: "https://api.leapfun.ai/v1", apiKey: "lf_sk_..." });
const speech = await client.audio.speech.create({
model: "gpt-4o-mini-tts", // runs on Leap Ultra
voice: "aurora",
input: "Welcome back. We pick up right where we left off.",
instructions: "warm, unhurried", // the director's note
});
await writeFile("welcome.mp3", Buffer.from(await speech.arrayBuffer()));
Works the same from Deno, Bun or an edge function: it is one HTTPS request.
Install the nodeSettings → Community Nodes → install n8n-nodes-leapfun.
Add the credentialPaste your key from Settings → Developer API in the app. Leave Base URL at its default.
Speech → GenerateEngine Ultra, voice aurora, Director's Note warm, unhurried. The MP3 lands in the binary field data.
No community node allowed on your instance? An HTTP Request node does the same: POST https://api.leapfun.ai/v1/tts, header Authorization: Bearer lf_sk_..., JSON body with text, engine, voice, note, response format File. The full guide is on LeapFun for n8n.
Endpoints
Base URL https://api.leapfun.ai/v1. Every request carries Authorization: Bearer lf_sk_.... Up to 5,000 characters of text per request.
The voice catalog with ids, languages and the engines each voice runs on. Your cloned and designed voices are included.
JSON
GET /v1/engines
The four engines, what each bills and which one your plan can use.
JSON
GET /v1/usage
Your credit balance and this period's spend, app and API together.
JSON
Model names on the OpenAI-compatible route
You send
Runs on
Also accepted
gpt-4o-mini-tts
Leap Ultra
leap-ultra
tts-1-hd
Leap Pro
leap-pro
—
Leap Expressive
leap-expressive
tts-1
Leap Turbo
leap-turbo
Rate limits and billing
Limits are per workspace and per minute. Each response reports them in X-RateLimit-Limit, X-RateLimit-Remaining and X-RateLimit-Reset; a 429 carries Retry-After.
Plan
Requests per minute
API access
Free
10
Included, personal use
Starter
20
Included
Creator
30
Included
Pro
120
Included
Team
300
Included, shared by the team's seats
What a request costs
The same credits and the same rates as the app. There is no API surcharge, and a key does not change your plan. Plans and credit allowances are on the pricing page.
Engine
Bills
Director's note
Leap Ultra
1.5 credits per UTF-8 byte
Yes
Leap Pro
1 credit per character; voices shared with Ultra bill 1 credit per UTF-8 byte
Yes
Leap Expressive
1 credit per character
Emotion tags only
Leap Turbo
0.5 credits per character
No
Characters are counted on the text you send, including spaces and emotion tags. X-Credits-Used on every response is the exact figure.
Errors
Every error is JSON with one error object: type, code, message, param (the field at fault, when there is one) and request_id to quote to support.
Status
error.code
Meaning
401
invalid_api_key
The key is missing, revoked or mistyped.
402
insufficient_credits
Not enough credits for this request. Top up or wait for the monthly refill.
403
plan_required
Your workspace role cannot generate audio, or API access is switched off for your plan. Ask a workspace admin.
413
text_too_long
More than 5,000 characters in one request. Split the text.
429
rate_limited
Over your plan's requests per minute. Wait for Retry-After seconds.
All of them, including Free. Plans differ in credits and in requests per minute (Free 10, Starter 20, Creator 30, Pro 120, Team 300). Audio made on the Free plan is for personal, non-commercial use; commercial rights start on Starter.
Does the API cost extra?
No. There is no API price list. A request spends the same credits the same text would cost in the editor, from the same balance, and GET /v1/usage shows both together.
Is it OpenAI-compatible?
For speech, yes. Point the official SDK at https://api.leapfun.ai/v1 and call audio.speech.create as before; gpt-4o-mini-tts, tts-1-hd and tts-1 map to Ultra, Pro and Turbo, and instructions is read as the director's note. Our own /v1/tts exposes the extra response headers.
Can I use my cloned voice?
Yes. Voices you cloned or designed in the app appear in GET /v1/voices with their ids and run on the engines they were made for. The usual plan rules for cloning apply; the API adds none of its own.
Tell us what you're building
We are shaping the API with the people who use it. Leave an email and a line about your project and we will write back when there is something to show, including early access to new endpoints and higher limits.
Ready to ship a voice?
Create a key in Settings, make the first request above, and hear your note followed.