Overview
Sleepytale API
Generate AI lullabies and musical bedtime stories from a single text prompt.
Overview
The Sleepytale API turns a short text prompt into finished bedtime audio. It produces two formats:
- Lullaby: a fully sung lullaby, delivered as an MP3.
- Musical: a narrated bedtime story with a sung lullaby in the middle, delivered as an MP3.
Both endpoints can optionally generate AI cover art for the piece (include_image), and both return lyrics or the full narrated text alongside the audio.
Listen to a sample
Straight from the API, no post-processing:
Lullaby sample
Musical sample
How it works
The API is asynchronous. Submitting a generation returns 202 Accepted with a job_id; you then poll the job until its status is succeeded or failed. v1 is polling-only.
curl -X POST https://www.sleepytale.com/api/v1/lullaby \
-H "Authorization: Bearer $SLEEPYTALE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"prompt": "a sleepy little fox curling up under the stars"}'curl https://www.sleepytale.com/api/v1/jobs/$JOB_ID \
-H "Authorization: Bearer $SLEEPYTALE_API_KEY"Authentication
Send your secret key as a bearer token on every request: Authorization: Bearer sk_live_.... The key is the identity. Requests never accept a user id. Create and manage keys from your Dashboard.
Keep your key server-side
sk_live_... in client-side code. Anyone with the key can spend your credits.Credits
Every plan includes a monthly credit allotment. A lullaby costs 1 credit, a musical 2 credits, and the optional cover image adds +1. Credits are charged on success only and reset each billing cycle. See Pricing for plan details.