Generate music via REST API. Send a text prompt or raw geometry parameters, receive audio (WAV, MP3) or MIDI. All generation is deterministic — identical parameters always produce identical output.
Submit a generation job. Returns a job ID for polling.
| Parameter | Type | Description |
|---|---|---|
prompt | string | Text description of desired music (e.g. "tense chase scene"). Either prompt or params required. |
params | object | Direct geometry parameters (see below). Either prompt or params required. |
duration_seconds | float | Duration in seconds (1–300). Default: 30 |
tempo | float | BPM (40–300). Default: 120 |
format | string | wav, mp3, or midi. Default: wav |
| Parameter | Type | Range | Description |
|---|---|---|---|
n | int | 2–2000 | Complexity — number of geometric elements |
k | int | 1–n/2 | Texture — step size controlling interval structure |
omega | float | -10 to 10 | Movement — rotation speed of the geometry |
xi | float | -10 to 10 | Depth — vertical perturbation |
psi | float | 0 to 2π | Phase — shifts the tonal center |
lock_psi_tau | bool | — | Lock phase to tempo grid for rhythmic patterns |
Poll for generation completion. Jobs typically complete in a few seconds.
Status values: pending → processing → complete | failed
Returns the generated audio file. Content-Type matches the requested format.
Synchronous generation of a short (5s) preview clip. Returns audio directly — no job polling needed.
Get all available curated presets — moods, genres, and scenes mapped to optimized geometry parameters.
60+ presets covering moods, genres, scenes, and experimental textures.
Errors return standard HTTP status codes with a JSON body:
| Status | Meaning |
|---|---|
400 | Bad request — missing or invalid parameters |
404 | Job not found |
409 | Job not yet complete (for download endpoint) |
422 | Validation error — parameter out of range |