Product Text to Speech Voice Cloning Voice Design Languages Audiobook Studio Speech to Text Voice Library Use cases Faceless YouTube Short-form & UGC Video ads Audiobooks eLearning All use cases Resources Free AI Tools Guides How-to Compare FAQ Pricing Start free Log in

Text to Speech API with a Director's note

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.

Quickstart

One request, one MP3. Replace lf_sk_... with a key from Settings → Developer API in the app.

terminal
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.

Endpoints

Base URL https://api.leapfun.ai/v1. Every request carries Authorization: Bearer lf_sk_.... Up to 5,000 characters of text per request.

EndpointWhat it doesReturns
POST /v1/ttsGenerate speech. Body: text, engine (ultra · pro · expressive · turbo, default ultra), voice, optional note.MP3 bytes + X-Job-Id, X-Credits-Used, X-Engine, X-RateLimit-*
POST /v1/audio/speechOpenAI-compatible speech. Body: model, voice, input, optional instructions (the director's note).MP3 bytes, same headers
GET /v1/voicesThe voice catalog with ids, languages and the engines each voice runs on. Your cloned and designed voices are included.JSON
GET /v1/enginesThe four engines, what each bills and which one your plan can use.JSON
GET /v1/usageYour credit balance and this period's spend, app and API together.JSON

Model names on the OpenAI-compatible route

You sendRuns onAlso accepted
gpt-4o-mini-ttsLeap Ultraleap-ultra
tts-1-hdLeap Proleap-pro
—Leap Expressiveleap-expressive
tts-1Leap Turboleap-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.

PlanRequests per minuteAPI access
Free10Included, personal use
Starter20Included
Creator30Included
Pro120Included
Team300Included, 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.

EngineBillsDirector's note
Leap Ultra1.5 credits per UTF-8 byteYes
Leap Pro1 credit per character; voices shared with Ultra bill 1 credit per UTF-8 byteYes
Leap Expressive1 credit per characterEmotion tags only
Leap Turbo0.5 credits per characterNo

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.

Statuserror.codeMeaning
401invalid_api_keyThe key is missing, revoked or mistyped.
402insufficient_creditsNot enough credits for this request. Top up or wait for the monthly refill.
403plan_requiredYour workspace role cannot generate audio, or API access is switched off for your plan. Ask a workspace admin.
413text_too_longMore than 5,000 characters in one request. Split the text.
429rate_limitedOver your plan's requests per minute. Wait for Retry-After seconds.
402 response
{
  "error": {
    "type": "billing_error",
    "code": "insufficient_credits",
    "message": "This request needs 1,284 credits; the workspace has 310.",
    "param": null,
    "request_id": "req_01J9W2K7H4"
  }
}

Questions developers ask

Which plan includes the API?

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.

What are you building?
No newsletter. One reply, from a person.

Ready to ship a voice?

Create a key in Settings, make the first request above, and hear your note followed.

Create an API key