🎵 MagentaRT Research API

Purpose: AI music generation for iOS/web app research using Google's MagentaRT.

Available Endpoints

WebSocket Quick Start (rt mode)

Connect to wss://<your-space>/ws/jam and send:

{
  "type": "start",
  "mode": "rt",
  "binary_audio": false,
  "params": {
    "styles": "warmup",
    "temperature": 1.1,
    "topk": 40,
    "guidance_weight": 1.1,
    "pace": "realtime",          // or "asap" to bootstrap quickly
    "max_decode_frames": 50      // default ~2.0s; try 36–45 on smaller GPUs
  }
}

Update parameters live:

{
  "type": "update",
  "styles": "jazz, hiphop",
  "style_weights": "1.0,0.8",
  "temperature": 1.2,
  "topk": 64,
  "guidance_weight": 1.0,
  "pace": "realtime",
  "max_decode_frames": 40
}

Stop:

{"type":"stop"}

Notes

Licensing: Uses MagentaRT (Apache 2.0 + CC-BY 4.0). Users are responsible for outputs.

See /docs for full API details and client examples.