Sleepytale API
Studio-grade AI bedtime audio for your products
Generate sung lullabies and musical bedtime stories from text prompts: one prompt in, finished MP3 out. A simple async REST API with credits charged on success only, available for broad commercial use.
import time, requests
API = "https://www.sleepytale.com/api/v1"
headers = {"Authorization": "Bearer sk_live_..."}
job = requests.post(f"{API}/lullaby", headers=headers, json={
"prompt": "a sleepy little fox curling up under the stars",
}).json()
while True:
status = requests.get(f"{API}/jobs/{job['job_id']}", headers=headers).json()
if status["status"] in ("succeeded", "failed"):
break
time.sleep(5)
print(status["result"]["audio_url"]) # your MP3Sleepytale API
Bedtime audio from a single prompt
Bedtime audio generation, built for commercial use
Audio you generate is yours to use in your products, including commercially. Failed generations never consume credits. Retries are free, and idempotency keys make them safe.

Self-Serve
For individuals and small teams building with the Sleepytale API
- Plans from $0 to $385/month
- Up to 9,000 credits/month generation
- Lullabies (1 credit), musicals (2), cover art (+1)
- Up to 120 requests/min and 15 concurrent jobs

Enterprise
For organizations building bedtime audio into products at scale
- Custom credit volumes and pricing
- Custom rate limits and concurrency
- Direct support and onboarding
- Flexible terms for products at scale
A lullaby costs 1 credit, a musical 2, cover art +1. See the billing details in the docs.
Everything you need to build bedtime audio
Sung AI lullabies and musical bedtime stories from a single prompt, through a simple async REST API with MP3 output, monthly plans, and credits charged on success only.
import time, requests
API = "https://www.sleepytale.com/api/v1"
headers = {"Authorization": "Bearer sk_live_..."}
job = requests.post(f"{API}/lullaby", headers=headers, json={
"prompt": "a sleepy little fox curling up under the stars",
}).json()
while True:
status = requests.get(f"{API}/jobs/{job['job_id']}", headers=headers).json()
if status["status"] in ("succeeded", "failed"):
break
time.sleep(5)
print(status["result"]["audio_url"]) # your MP3
Daisy's Delightful Beach Adventure
Generated by Sleepytale
Fully sung, soothing lullabies from one sentence, with lyrics, melody, and vocals included.
- 1Sleepy Little Fox
- 2The Brave Little Tugboat and the Dark Harbor
- 3Daisy's Delightful Beach Adventure
Generate lullabies
Turn one sentence into a fully sung AI lullaby with original lyrics, a soothing melody, and warm vocals, delivered as a finished MP3. Built for baby sleep apps, kids’ story platforms, and bedtime routines. 1 credit each.
Compose musicals
Generate narrated bedtime stories with an original sung lullaby at their heart: a little audiobook for winding down, written, narrated, and sung from a single text prompt. 2 credits each.
Add AI cover art
Set include_image: true on either format to get matching AI-generated cover art. Kid-friendly illustrations for album tiles, story cards, and playlists that fit each piece’s mood. +1 credit.
Track every job
Submissions return a job_id instantly while generation runs on a durable async queue; poll one REST endpoint for status, the MP3 audio URL, lyrics, and title. Idempotency keys make retries safe.
Built for production
Charged on success only
Failed generations never consume credits. Retries are free, and idempotency keys make them safe.
Durable async jobs
Generations run on a durable job queue with automatic retries. A 202 means your job will finish or fail loudly, never strand.
Plain REST, any language
Bearer-token auth and JSON in, MP3 URL out. No SDK required: if it can make an HTTP request, it can sing.
Frequently asked questions
What is the Sleepytale API?
A REST API that turns a text prompt into finished bedtime audio: sung lullabies or narrated musical stories, delivered as MP3s with lyrics and an optional AI cover image.
How does pricing work?
Monthly plans with included credits, from $0 to $385/mo. A lullaby costs 1 credit, a musical 2, cover art +1. Credits are charged on success only and reset each cycle.
How fast are generations?
The API is asynchronous: submissions return a job_id immediately and generations typically complete within a few minutes. Poll the jobs endpoint until the status is succeeded.
How do I authenticate?
Create a key in the dashboard and send it as a bearer token in the Authorization header. The key is the identity; requests never include user ids.
Can I use the audio commercially?
Yes. Audio you generate is yours to use in your products, including commercially. For high-volume or redistribution-heavy use cases, contact us about Enterprise.
Is there a free AI lullaby generator API?
Yes. The Free plan includes 10 credits every month, enough to generate real lullabies against the production API before you pay anything. No credit card required to start.
Can the API generate AI bedtime stories with narration?
Yes. The musical endpoint produces a narrated bedtime story with a fully sung lullaby in the middle, delivered as a single MP3 along with the complete story text and title.
How is this different from a text-to-speech API?
Text-to-speech reads your words aloud. The Sleepytale API composes original music: lullabies are written and fully sung from your prompt, with lyrics, melody, and vocals, and musicals blend warm narration with an original sung song.
What do I get with each generation?
A finished MP3, the lyrics (or full narrated text), and a title. Set include_image: true to also receive matching AI cover art for album tiles and story cards.
Which programming languages can I use?
Any language that can make an HTTP request. The API is plain REST with JSON, and the docs include working examples in Python, TypeScript, JavaScript, and cURL.
Is the content safe for kids?
Yes. The API is built for children’s bedtime content. Every prompt passes a content check before generation, and the output is calm, soothing audio designed for winding down.
How is my data handled?
Generations are processed and stored on managed cloud infrastructure in the United States, and nothing you submit is used to train models.