Open in the interactive docs · markdown for agents: https://neuraldeep.tech/docs/music.md

Music · Music API

Music generation with the same key, endpoints under /v1/music/*. The model is Google Lyria 3 Pro: a song with vocals from a style description and lyrics, or an instrumental, 48 kHz, mp3. A track is usually ready in 20–30 seconds.

The unit is a track. The remainder is in GET /v1/music/quota. On the wallet a track costs 10 ₽. Only finished tracks are charged: a failed task returns the quota and the money.

How it works. Everything is asynchronous, with our own format, not OpenAI's. POST /v1/music/generate creates a task and answers right away with {"task_id": "...", "status": "queued", "poll": "/v1/music/tasks/..."}. Then poll GET /v1/music/tasks/{id} until status becomes succeeded or failed (queued and running on the way). A finished task has tracks[] with a url. Download the file via GET /v1/music/tasks/{id}/result?index=0; until the track is ready this endpoint answers 409.

endpoint what
POST /v1/music/generate generation, JSON
GET /v1/music/tasks/{id} status and track
GET /v1/music/tasks/{id}/result?index=0 the track as a file, mp3 by default, audio_format picks another: wav, wav32, flac, opus, aac
GET /v1/music/quota tracks remaining
GET /v1/music/models available models

What to put in the request.

Fields outside the list are silently dropped. One song per request, batch_size above 1 gives 422. Covers, section edits and separate stems are not available now.

id=$(curl -s https://api.neuraldeep.tech/v1/music/generate \
  -H "Authorization: Bearer $YOUR_KEY" -H "Content-Type: application/json" \
  -d '{"prompt":"indie pop, acoustic guitar, warm female vocals","lyrics":"[verse]\nWalking home at dawn\n[chorus]\nWe are home again","vocal_language":"en","audio_duration":90}' | jq -r .task_id)

curl https://api.neuraldeep.tech/v1/music/tasks/$id \
  -H "Authorization: Bearer $YOUR_KEY"

curl "https://api.neuraldeep.tech/v1/music/tasks/$id/result?index=0" \
  -H "Authorization: Bearer $YOUR_KEY" -o track.mp3
import time, httpx

H = {"Authorization": "Bearer $YOUR_KEY"}
job = httpx.post(
    "https://api.neuraldeep.tech/v1/music/generate", headers=H,
    json={"prompt": "upbeat pop punk about a cat who hates Mondays", "vocal_language": "en"},
).json()
tid = job["task_id"]

for _ in range(120):
    st = httpx.get(f"https://api.neuraldeep.tech/v1/music/tasks/{tid}", headers=H).json()
    if st["status"] in ("succeeded", "failed"):
        break
    time.sleep(3)

audio = httpx.get(f"https://api.neuraldeep.tech/v1/music/tasks/{tid}/result?index=0", headers=H).content
open("track.mp3", "wb").write(audio)

Errors.

Reference sections (markdown for agents)