txt2audio base1.35 min
$0.02
Create complete, professional-quality songs in seconds! DiffRhythm is the world's first open source latent diffusion model that generates full length vocal and instrumental tracks from simple text prompts. Describe your vision and let DiffRhythm handle the rhythm, melody, and lyrics.
Pay-as-you-go access through PiAPI.
$0.02
$0.02
Capabilities from the production model page.
Generate complete songs up to 4 minutes 45 seconds in a single step - no stitching short clips or multi-stage workflows.
Describe moods, genres, or imagery (e.g. 'Jazzy Nightclub Vibe' or 'Indie Folk Ballad with Acoustic Harmonica') to shape unique compositions.
Our asynchronous API call structure allows developers to submit tasks and have their program continues on, until a "callback" function is executed.
Craft soundscapes from wild prompts like "Arctic Theremin Storms" - perfect for film scores, game soundtracks, or experimental music.
Focus on lyrical storytelling with standalone vocal tracks, ideal for refining lyrics or acapella projects.
Seamlessly generate songs in English or Chinese, with natural-sounding vocal phrasing in both languages.
Experience stable performance even under the most demanding load - our service can automatically scale as per varying peak load, processing high number of jobs concurrently while keeping latencies to the minimum!
Leverage non-autoregressive architecture to create songs 100x faster than language model-based alternatives.
Apache 2.0 license allows commercial use, customization, and integration into your creative tools or apps.
Adjust song duration on the fly, from 30-second jingles to extended 10-minute compositions (coming soon!).
Expand existing tracks or blend styles by extending AI-generated songs with new sections (coming soon!).
Sign up and grab an API key from the PiAPI workspace — free credits are included on sign-up.
Add credits on the billing page when you are ready to scale beyond the free tier.
POST your first task following the API docs, then poll the task until the result is ready.
Prototype prompts and settings in the the playground above before wiring them into your product.
curl -X POST 'https://api.piapi.ai/api/v1/task' \
-H 'X-API-Key: YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{
"model": "Qubico/diffrhythm",
"task_type": "txt2audio-base",
"input": {
"lyrics": "[00:00.00]A bright new melody begins",
"style_prompt": "upbeat indie pop"
}
}'
# → { "task_id": "9d5a…", "status": "pending" }curl 'https://api.piapi.ai/api/v1/task/{task_id}' \
-H 'X-API-Key: YOUR_API_KEY'
# poll until status = completed
{
"data": {
"status": "completed",
"output": {
"audio_url": "https://img.theapi.app/ephemeral/…"
}
}
}$ npm install -g piapi-cli $ piapi run diffrhythm \ lyrics="[00:00.00]A bright new melody begins" \ style_prompt="upbeat indie pop" ✓ Task completed! https://img.theapi.app/ephemeral/…
DiffRhythm is the first open-source latent diffusion model developed by ASLP Lab, designed specifically for end-to-end full-length song generation. It creates complete tracks (up to 285s) with both vocals and instrumental accompaniment in seconds, using only text prompts like lyrics and style descriptions. Unlike traditional multi-stage systems, it combines simplicity, speed, and scalability - making AI powered music creation accessible to everyone.
DiffRhythm API is created by and it lets developers integrate our song generation technology directly into apps, tools, or workflows. It provides programmatic access to the model's capabilities, enabling features like bulk generation, real-time customization, and seamless scaling for commercial use. Whether you're building a music production app, a game soundtrack engine, or a creative AI platform, the API handles compute-heavy tasks while you focus on user experience.
The DiffRhythm API supports virtually any genre or style described in your prompts! Whether you need pop, jazz, electronic, folk, cinematic scores, or experimental soundscapes, it adapts to your creative vision.
For our "Pay-as-you-go" option, it costs $0.02 for each generation call for both txt2audio base (1.35 mins) and txt2audio full (4.45mins).
Yes, different subscription plans (Free, Creator, or Pro Plan) will have grant the "Pay-as-you-go" users different number of concurrent jobs, please refer to our pricing for details.
Yes! The Apache 2.0 license permits commercial use, but you must verify originality and disclose AI involvement!
Just lyrics (optional) and a style prompt. No instrumental references or melody templates needed!
Our workspace has integrated Stripe in our payment system, which will allow payments to be made from most major credit card providers.
No, we do not offer refunds. But when you first sign up for an account on PiAPI's Workspace, you are given free credits to try our DiffRhythm (specifically the "Pay-as-you-go" service) before making payments!
Please email us at - we'd love to listen to your feedback and explore potential collaborations!
More questions? See the API docs.
DiffRhythm API