Text-to-Music
POST /api/v1/music/text2music
Generate complete musical compositions with vocals from text prompts and lyrics.
- Python
- Node.js
- cURL
| Parameter | Type | Required | Description |
|---|---|---|---|
caption | string | Yes | Text description of desired music style (0-2048 chars). Also accepts prompt |
lyrics | string | No | Song lyrics with structure tags: [verse], [chorus], [bridge], [intro], [outro], [Instrumental] |
instrumental | bool | No | If true, ignores lyrics and generates instrumental. Default: false |
genre_preset | string | No | Genre preset name (see Overview) |
display_name | string | No | Custom name for the track |
| + all base parameters |
MusicGenerationResponse with job object and message.
Instrumental Generation
POST /api/v1/music/prompt2instrumental
Create instrumental tracks without vocals from text prompts.
- Python
- Node.js
- cURL
| Parameter | Type | Required | Description |
|---|---|---|---|
prompt | string | Yes | Text description of desired instrumental |
genre_preset | string | No | Genre preset name |
display_name | string | No | Custom name for the track |
| + all base parameters |
Rap Generation
POST /api/v1/music/text2rap
Generate rap music with custom lyrics and beats.
- Python
- Node.js
- cURL
Vocals Generation
POST /api/v1/music/lyric2vocals
Generate vocal tracks from lyrics without full instrumental backing.
- Python
- cURL
Sample Generation
POST /api/v1/music/text2samples
Create audio loops, one-shots, and samples for music production.
- Python
- cURL
| Parameter | Type | Default | Description |
|---|---|---|---|
sample_type | string | null | Type of sample: loop, one-shot |
tempo | int | null | Target tempo in BPM (60-200) |
Simple Mode
POST /api/v1/music/simple
The easiest way to generate music. Describe what you want in natural language and AudioMusic V2 automatically generates the caption, lyrics, BPM, key, time signature, and duration.
- Python
- Node.js
- cURL
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
query | string | Yes | — | Natural language description of desired music (1-1000 chars) |
instrumental | bool | No | false | Generate instrumental only |
vocal_language | string | No | "unknown" | Vocal language code (auto-detected if "unknown") |
display_name | string | No | null | Custom name for the track |
duration | float | No | -1 | Duration in seconds (-1 for auto) |
format | string | No | "flac" | Output format |
- Generate a detailed caption/tags from your natural language query
- Write lyrics (unless instrumental)
- Determine optimal BPM, musical key, and time signature
- Estimate appropriate duration
Response Format
All generation endpoints return the same response structure:GET /jobs/{id}/status):
