Music GET / Returns: 200 text/plain (this documentation) GET /v2/debug Returns: 200 application/json debug snapshot GET /v2/songs/search?q=&t=<1..10> q is required (2..2048 chars | spotify url or text) t is optional, default 10, min 1, max 10 Returns: 200 application/json { "query": string, "total": number, "items": [...] } Errors: 400 { "error": "invalid_query" } GET /v2/songs/library?p= p is optional, default 1, min 1 Returns: 200 application/json { "page": number, "total": number, "totalPages": number, "items": [...] } Errors: 400 { "error": "invalid_page" } GET /v2/songs/:id Returns: 200 application/json song details payload Errors: 404 { "error": "not_found" } GET /v2/songs/:id/stream?f=flac,mp3 f is optional and supports flac, mp3 (default: flac,mp3) supports Range requests via the range header Returns: audio response with provider headers/status when ready Errors: 404 { "error": "not_found" } 416 with content-range (or { "error": "invalid_range" }) 502 { "error": "stream_unavailable", "detail": string } 504 { "error": "processing_timeout", ... } GET /v2/songs/:id/download?f=flac,mp3&meta=true f is optional and supports flac, mp3 (default: flac,mp3) meta (or tag) is optional; when true, waits for full media then embeds metadata (title, artist(s), album, cover, lyrics) Returns: attachment download response when ready Errors: 404 { "error": "not_found" } 503 { "error": "metadata_tagging_unavailable", "detail": string } (metadata mode when ffmpeg is unavailable) 502 { "error": "metadata_tagging_failed", "detail": string } (metadata mode tagging failure) 502 { "error": "stream_unavailable", "detail": string } 504 { "error": "processing_timeout", ... } Global errors: 404 { "error": "not_found" } 500 { "error": "internal_error" } Examples: curl "https://music.gloss.moe/v2/debug" curl "https://music.gloss.moe/v2/songs/search?q=https://open.spotify.com/track/5KVpCiPMTmB3lqO5haGgi4&t=1" curl "https://music.gloss.moe/v2/songs/library?p=1" curl "https://music.gloss.moe/v2/songs/3w9q0w6rfxgr" curl -L --fail "https://music.gloss.moe/v2/songs/3w9q0w6rfxgr/stream?f=mp3" -o song.mp3 curl -L --fail "https://music.gloss.moe/v2/songs/3w9q0w6rfxgr/download?f=flac" -o song.flac curl -L --fail "https://music.gloss.moe/v2/songs/3w9q0w6rfxgr/download?f=flac&meta=true" -o song-tagged.flac