Skip to main content

audio models

DiffRhythm AI & API: Instant Full-Length Song Generation!

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.

Get Started!

DiffRhythm API Pricing

Pay-as-you-go access through PiAPI.

txt2audio base1.35 min

$0.02

    txt2audio full4.45 min

    $0.02

      Features

      Capabilities from the production model page.

      End-to-End Full-Length Music

      Generate complete songs up to 4 minutes 45 seconds in a single step - no stitching short clips or multi-stage workflows.

      Style + Scene-Driven Creation!

      Describe moods, genres, or imagery (e.g. 'Jazzy Nightclub Vibe' or 'Indie Folk Ballad with Acoustic Harmonica') to shape unique compositions.

      Asynchronous API Calls

      Our asynchronous API call structure allows developers to submit tasks and have their program continues on, until a "callback" function is executed.

      Instrumental Mode

      Craft soundscapes from wild prompts like "Arctic Theremin Storms" - perfect for film scores, game soundtracks, or experimental music.

      Pure Vocal Generation

      Focus on lyrical storytelling with standalone vocal tracks, ideal for refining lyrics or acapella projects.

      Multilingual Music

      Seamlessly generate songs in English or Chinese, with natural-sounding vocal phrasing in both languages.

      High Concurrency

      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!

      10-Second Inference Speed

      Leverage non-autoregressive architecture to create songs 100x faster than language model-based alternatives.

      Open-Source Freedom

      Apache 2.0 license allows commercial use, customization, and integration into your creative tools or apps.

      Dynamic Length Control

      Adjust song duration on the fly, from 30-second jingles to extended 10-minute compositions (coming soon!).

      Song Extension & Remixing

      Expand existing tracks or blend styles by extending AI-generated songs with new sections (coming soon!).

      Get started

      Create your API key

      Sign up and grab an API key from the PiAPI workspace — free credits are included on sign-up.

      Top up credits

      Add credits on the billing page when you are ready to scale beyond the free tier.

      Call the API

      POST your first task following the API docs, then poll the task until the result is ready.

      Iterate in the playground

      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" }

      Frequently asked questions

      What is DiffRhythm?

      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.

      What is the DiffRhythm API?

      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.

      What types of music can DiffRhythm generate?

      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.

      What is the Pricing for the music generation?

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

      Is there a maximum number of concurrent jobs for the "Pay-as-you-go" Option?

      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.

      Can I use DiffRhythm songs commercially?

      Yes! The Apache 2.0 license permits commercial use, but you must verify originality and disclose AI involvement!

      What inputs are required?

      Just lyrics (optional) and a style prompt. No instrumental references or melody templates needed!

      How do I pay for this API?

      Our workspace has integrated Stripe in our payment system, which will allow payments to be made from most major credit card providers.

      Do you offer refunds?

      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!

      How can I get in touch with your team?

      Please email us at - we'd love to listen to your feedback and explore potential collaborations!

      More questions? See the API docs.

      Our blog

      DiffRhythm API