Endpoint
Request body
Response
Example
Workflow tip
For best results, run Stem Separation first and pass the returned job ID asstem_clip_id:
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Export the musical notes of a clip as MIDI instrument data
POST /api/v1/music/midi
| Field | Type | Required | Description |
|---|---|---|---|
clip_id | string | Yes | Clip ID to analyze. Obtain from Upload Audio (data.clipId) or a completed generation task (results[].id). |
stem_clip_id | string | No | Optional stem clip ID (from Stem Separation) for more accurate instrument isolation. |
{
"code": 0,
"message": "ok",
"request_id": "req-1710000000000",
"data": {
"state": "complete",
"instruments": {
"piano": [ ... ],
"bass": [ ... ]
}
}
}
| Field | Type | Description |
|---|---|---|
state | string | Processing state |
instruments | object | Map of instrument name → note array |
curl -X POST https://api.example.com/api/v1/music/midi \
-H "Authorization: Bearer sk-mm-your-key" \
-H "Content-Type: application/json" \
-d '{
"clip_id": "abc123def456"
}'
stem_clip_id:
# Step 1: separate stems
POST /api/v1/music/stem → stem.id = "stem-xyz"
# Step 2: export MIDI with stem context
POST /api/v1/music/midi { "clip_id": "abc123", "stem_clip_id": "stem-xyz" }