Skip to content

DiffRhythm: Lyrics to Song

Integrate

Model id diffrhythm
# Run the model; wait up to 20 s for the finished result in the same call
curl -X POST "https://api.doitong.com/v1/run/diffrhythm?wait=20" \
  -H "Authorization: Bearer $DOITONG_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "lyrics": "A red fox trots through fresh snow at sunrise, soft golden light, shallow depth of field"
  }'

# Still "queued" or "running"? Poll with the id from the response:
curl "https://api.doitong.com/v1/requests/REQUEST_ID?wait=20" \
  -H "Authorization: Bearer $DOITONG_API_KEY"

This request: $0.10 100 API credits Run it on this page

Get API key
Open model Text to Music Reference inputs95–285 s #music

Turns lyrics into a full song, with optional style prompt, reference audio and 95 s or 285 s length

Open model · Audio

Your first result goes here

Build a request below and run it with your API key. Outputs are copied to our storage, kept forever or 7 days for free.

Build a request

Controls are generated from the model schema. The code and the price update as you change them.

•required

Song-generation prompt comprising exactly two sections, each introduced by either [chorus] or [verse].

music_duration 95 s

Length of the music to be generated.

Advanced style_prompt · reference_audio_url · scheduler · cfg_strength · num_inference_steps

Prompt describing the style for generated music.

Drop a file, or

URL pointing to reference audio for generating music.

scheduler default euler

Scheduler used when generating music.

default 4

CFG strength applied when generating music.

default 32

Inference step count for generating music.

POST /run/diffrhythm?wait=20 quote → $0.10
# Run the model; wait up to 20 s for the finished result in the same call
curl -X POST "https://api.doitong.com/v1/run/diffrhythm?wait=20" \
  -H "Authorization: Bearer $DOITONG_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "lyrics": "A red fox trots through fresh snow at sunrise, soft golden light, shallow depth of field"
  }'

# Still "queued" or "running"? Poll with the id from the response:
curl "https://api.doitong.com/v1/requests/REQUEST_ID?wait=20" \
  -H "Authorization: Bearer $DOITONG_API_KEY"

Run this request

Your key stays in this browser: it is sent only to the Doitong API and saved (localStorage) only if you tick Remember. Get an API key

About DiffRhythm: Lyrics to Song

Creates a complete song from lyrics. The `lyrics` must contain at least two sections, each starting with a [verse] or [chorus] tag. Steer the sound with `style_prompt` or `reference_audio_url`, and choose `music_duration` of 95s or 285s. Sampling controls include `scheduler`, `cfg_strength` (1 to 10) and `num_inference_steps` (10 to 100).

Parameters

NameType DefaultAllowed Description
lyricsrequired
Typestring
Song-generation prompt comprising exactly two sections, each introduced by either [chorus] or [verse].
reference_audio_urloptional
Typeurl · audio
URL pointing to reference audio for generating music.
style_promptoptional
Typestring
Prompt describing the style for generated music.
music_durationoptional
Typeenum
Default95s
95s285s
Length of the music to be generated.
cfg_strengthoptional
Typenumber
Default4
1 – 10
CFG strength applied when generating music.
scheduleroptional
Typeenum
Defaulteuler
eulermidpointrk4implicit_adams
Scheduler used when generating music.
num_inference_stepsoptional
Typeinteger
Default32
10 – 100
Inference step count for generating music.
required

File parameters take a public https:// URL, a data: URI up to 10 MB, or the file_url of an upload. Files

Output

GET /requests/req_8k2m4q7x1z9c3v5b6n0p2r4t
{
  "id": "req_8k2m4q7x1z9c3v5b6n0p2r4t",
  "object": "request",
  "model": "diffrhythm",
  "status": "succeeded",
  "created_at": "2026-10-20T12:00:00Z",
  "started_at": "2026-10-20T12:00:02Z",
  "completed_at": "2026-10-20T12:00:09Z",
  "queue_position": null,
  "cost": {
    "credits": 100,
    "usd": "0.10",
    "charged": 100,
    "refunded": 0
  },
  "input": {
    "lyrics": "A red fox trots through fresh snow at sunrise, soft golden light, shallow depth of field"
  },
  "output": {
    "audio": {
      "url": "https://content.doitong.com/dev-api/2026/10/20/req_8k2m4q7x1z9c3v5b6n0p2r4t/0-output.mp3",
      "content_type": "audio/mpeg",
      "file_name": "0-output.mp3",
      "file_size": 1843200
    }
  },
  "outputs": [
    {
      "type": "audio",
      "url": "https://content.doitong.com/dev-api/2026/10/20/req_8k2m4q7x1z9c3v5b6n0p2r4t/0-output.mp3",
      "content_type": "audio/mpeg",
      "file_size": 1843200,
      "duration": 12,
      "stored": true
    }
  ],
  "error": null,
  "metrics": {
    "inference_seconds": 6.8
  },
  "urls": {
    "self": "https://api.doitong.com/v1/requests/req_8k2m4q7x1z9c3v5b6n0p2r4t",
    "cancel": "https://api.doitong.com/v1/requests/req_8k2m4q7x1z9c3v5b6n0p2r4t/cancel"
  }
}
Your files, your choiceEvery outputs[].url is a copy on our storage: kept forever (paid per GB-month) or 7 days for free, by your account setting or ?storage=.
Same shape on every modeltype, url, content_type, width, height and duration, for images, video and audio alike. output is the model’s own result object.
Fields of output
audio
object {url, content_type, file_name, file_size}File containing the generated music.

For AI agents: this page as Markdown is at https://doitong.com/en-GB/developers/models/diffrhythm.md. All models and guides: https://doitong.com/developers/llms.txt