Qubico
  1. DiffRhythm
Qubico
  • Get Started
    • Overview
    • Quickstart
  • Endpoints
    • Flux
      • Flux with LoRA and Controlnet
      • Available LoRA and Controlnet
      • Flux API with Redux Variation, Fill, Inpaint and Outpaint
      • Create Task
        • Kontext
        • Text to Image
        • Image to Image
      • Get task
    • AI Hug
      • Get Task
      • Create Task
    • Faceswap
      • Multi Faceswap
      • Image Faceswap
      • Video Faceswap
      • Get Task
    • TTS
      • Zeroshot Text-to-Speech F5-TTS
      • Get Task
    • Trellis
      • Create Task
      • Get Task
    • WanX
      • Generate WanX Task with LoRA Using Qubico
      • Available LoRA Types for Wanx
      • Use Cases for Wanx LoRA
      • Use Cases for Wanx Control Camera
      • Create Task
      • Get Task
    • Skyreels
      • Create Task
      • Get Task
    • Framepack
      • Create Task
      • Get Task
    • Hunyuan Video
      • How to Make a Hunyuan API Call
      • Get Task
      • Generate Video
    • Mmaudio
      • Get Task
      • Generate Audio
    • DiffRhythm
      • Generate Audio
        POST
      • Get Task
        GET
    • Ace Step
      • Create Task
        • Text to Audio
        • Audio to Audio
        • Audio Edit
        • Audio Extend
      • Get Task
    • Tools
      • File Upload API
      • Video Upscale
      • Video Upscale-Get Task
      • Remove Background API
      • Remove Background-Get Task
      • Segment With Prompt API
      • Segment With Prompt API-Get Task
      • Image Upscale(Super Resolution) API
      • Image Upscale-Get Task
    • Account Management
      • Account Info
      • Task List Info
      • User Task History
  • Resources
    • Change Log
    • Output Storage
    • Unified API Schema
    • Webhook
    • Billings
  1. DiffRhythm

Generate Audio

POST
/api/v1/task

Overview#

This endpoint from Qubico's DiffRhythm API can generate audio based on a text prompt or reference audio with lyrics.
Lyric placement is highly flexible—Qubico users can customize lyric integration using structured input formats.
They can also choose different task_type values depending on the desired duration of the generated music.

Information & Pricing#

ModelTask TypeGenerated Audio DurationPrice (USD)
Qubico/diffrhythmtxt2audio-base~1.35 minutes$0.02 per generation
Qubico/diffrhythmtxt2audio-full~4.45 minutes$0.02 per generation

Example#

To generate high-quality music, users can:
Choose an audio style (e.g., pop, electronic, cinematic)
Provide either a text prompt or a reference audio (URL or base64)
Use timed lyrics for precise control over vocal placement
Here’s an example of structured lyric input:
[00:10.00] Drifting through the Milky Way’s glow, stars hum low and bright
[00:17.00] Every shadow hides a cosmos, burning without light
[00:24.00] You said you loved black holes’ silence, where time turns to dust
[00:31.00] I clung to supernova whispers, aching with their trust
[00:38.00] Orion’s belt held promises we strung like comet trails
[00:45.00] Now Saturn’s rings just echo how our gravity fails
[00:52.00] Your voice became a distant pulse, a quasars’ fading song
[00:59.00] I chart the void where constellations swore we’d belong
[01:06.00] Nebulas bleed hues we named—our scarlet, our chrome
[01:13.00] But cold dark matter cradles what the stars left alone…
[01:20.00] (Instrumental fade: synth waves & celestial chimes)
Users can control the musical style/tone through prompts when adding lyrics to precise time positions.
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST '/api/v1/task' \
--header 'x-api-key;' \
--header 'Content-Type: application/json' \
--data-raw '{
    "model": "Qubico/diffrhythm",
    "task_type": "txt2audio-base",
    "input": {
        "lyrics": "",
        "style_prompt": "pop",
        "style_audio": ""
    },
    "config": {
        "webhook_config": {
            "endpoint": "",
            "secret": ""
        }
    }
}'
Response Response Example
{
    "model": "Qubico/diffrhythm",
    "task_type": "txt2audio-base",
    "input": {
        "lyrics": "",
        "style_prompt": "pop",
        "style_audio": ""
    },
    "config": {
        "webhook_config": {
            "endpoint": "",
            "secret": ""
        }
    }
}

Request

Header Params

Body Params application/json

Examples

Responses

🟢200Success
application/json
Body

Modified at 2025-07-06 07:48:43
Previous
Generate Audio
Next
Get Task
Built with