Preskoči na vsebino

DiffRhythm: Lyrics to Song

Integracija

ID modela 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"

Ta zahteva: 0,10 $ 100 API kreditov Zaženi na tej strani

Pridobi ključ API
Open model Besedilo v glasbo Referenčni vnosi95–285 s #music

Besedilo pesmi pretvori v celotno skladbo, z izbirnim pozivom za slog, referenčnim zvokom in dolžino 95 s ali 285 s

Open model · Zvok

Tukaj bo vaš prvi rezultat

Spodaj sestavite zahtevo in jo zaženite s svojim ključem API. Izhodi se kopirajo v našo shrambo, kjer se hranijo za vedno ali 7 dni brezplačno.

Ustvari zahtevo

Kontrolniki se ustvarijo iz sheme modela. Koda in cena se posodobita, ko ju spreminjate.

•obvezno

Poziv za generiranje pesmi, sestavljen iz natanko dveh razdelkov, od katerih se vsak začne z [chorus] ali [verse].

music_duration 95 s

Dolžina glasbe, ki jo je treba generirati.

Napredno style_prompt · reference_audio_url · scheduler · cfg_strength · num_inference_steps

Poziv, ki opisuje slog generirane glasbe.

Spustite datoteko ali

URL referenčnega zvoka za generiranje glasbe.

scheduler privzeto euler

Razporejevalnik, uporabljen pri generiranju glasbe.

privzeto 4

Moč CFG pri generiranju glasbe.

privzeto 32

Število inferenčnih korakov za generiranje glasbe.

POST /run/diffrhythm?wait=20 cena → 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"

Zaženi to zahtevo

Vaš ključ ostane v tem brskalniku: pošlje se samo v Doitong API in shrani v localStorage samo, če označite možnost Zapomni si. Pridobi ključ API

O modelu DiffRhythm: Lyrics to Song

Ustvari celotno skladbo iz besedila. `lyrics` mora vsebovati vsaj dva razdelka, od katerih se vsak začne z oznako [verse] ali [chorus]. Zvok usmerite z `style_prompt` ali `reference_audio_url` in izberite `music_duration` 95s ali 285s. Kontrole vzorčenja vključujejo `scheduler`, `cfg_strength` (1 do 10) in `num_inference_steps` (10 do 100).

Parametri

ImeVrsta PrivzetoDovoljeno Opis
lyricsobvezno
Vrstastring
Poziv za generiranje pesmi, sestavljen iz natanko dveh razdelkov, od katerih se vsak začne z [chorus] ali [verse].
reference_audio_urlneobvezno
Vrstaurl · audio
URL referenčnega zvoka za generiranje glasbe.
style_promptneobvezno
Vrstastring
Poziv, ki opisuje slog generirane glasbe.
music_durationneobvezno
Vrstaenum
Privzeto95s
95s285s
Dolžina glasbe, ki jo je treba generirati.
cfg_strengthneobvezno
Vrstanumber
Privzeto4
1 – 10
Moč CFG pri generiranju glasbe.
schedulerneobvezno
Vrstaenum
Privzetoeuler
eulermidpointrk4implicit_adams
Razporejevalnik, uporabljen pri generiranju glasbe.
num_inference_stepsneobvezno
Vrstainteger
Privzeto32
10 – 100
Število inferenčnih korakov za generiranje glasbe.
obvezno

Parametri datotek sprejmejo javni https:// URL, podatkovni URI data: do 10 MB ali file_url naložene datoteke. Datoteke

Izhod

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"
  }
}
Vaše datoteke, vaša izbiraVsak outputs[].url je kopija v naši shrambi: hrani se za vedno (plačilo na GB-mesec) ali 7 dni brezplačno, glede na nastavitev računa ali ?storage=.
Enaka struktura pri vsakem modelutype, url, content_type, width, height in duration za slike, videoposnetke in zvok. output je lasten objekt rezultata modela.
Polja izhoda
audio
object {url, content_type, file_name, file_size}Datoteka z generirano glasbo.

Za agente AI: ta stran je v obliki Markdown na voljo na https://doitong.com/sl/developers/models/diffrhythm.md. Vsi modeli in vodniki: https://doitong.com/developers/llms.txt