{"components":{"schemas":{"DeleteFileRequest":{"additionalProperties":false,"properties":{"filename":{"description":"Exact filename returned by the completed job, including its artist/album path. No arbitrary path is accepted. Cloud removal uses the registered rclone mapping; a missing mount is refused.","maxLength":1024,"minLength":1,"type":"string"}},"required":["filename"],"type":"object"},"DownloadRequest":{"additionalProperties":false,"properties":{"quality":{"default":"best","enum":["best","320","160","96","48","12"],"type":"string"},"songIds":{"items":{"pattern":"^[A-Za-z0-9_-]{1,128}$","type":"string"},"maxItems":500,"minItems":1,"type":"array"}},"required":["songIds"],"type":"object"},"Error":{"properties":{"error":{"properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"},"success":{"enum":[false],"type":"boolean"}},"required":["success","error"],"type":"object"},"Login":{"additionalProperties":false,"properties":{"apiKey":{"maxLength":4096,"minLength":32,"type":"string","writeOnly":true}},"required":["apiKey"],"type":"object"},"Playback":{"properties":{"bitrate":{"type":"integer"},"codec":{"type":"string"},"container":{"type":"string"},"duration":{"type":"integer"},"id":{"type":"string"},"mimeType":{"type":"string"},"name":{"type":"string"},"quality":{"type":"string"},"size":{"format":"int64","type":"integer"},"supportsRange":{"type":"boolean"},"url":{"format":"uri","type":"string"},"verified":{"type":"boolean"}},"required":["id","url","quality","verified"],"type":"object"},"Settings":{"additionalProperties":false,"properties":{"download_concurrency":{"maximum":16,"minimum":1,"type":"integer"},"download_dir":{"description":"Dedicated managed/local/cloud folder; no unsafe roots or escaping symlinks","type":"string"},"require_mount":{"type":"boolean"}},"required":["download_dir","download_concurrency","require_mount"],"type":"object"},"Success":{"properties":{"data":{},"success":{"enum":[true],"type":"boolean"}},"required":["success","data"],"type":"object"}},"securitySchemes":{"apiKey":{"in":"header","name":"X-API-Key","type":"apiKey"},"bearer":{"scheme":"bearer","type":"http"},"session":{"in":"cookie","name":"synapse_music_session","type":"apiKey"}}},"info":{"description":"Direct JioSaavn catalog and ordinary CDN playback. Integration keys permit catalog/playback GETs only. Owner keys are required for settings, jobs and sessions. Cookie mutations require matching Origin; cross-origin browser requests are not enabled. Metadata availability depends on the upstream service and its rights restrictions.","title":"Synapse Music API","version":"0.1.0"},"openapi":"3.0.3","paths":{"/albums":{"get":{"parameters":[{"in":"query","name":"id","required":false,"schema":{"type":"string"}},{"in":"query","name":"link","required":false,"schema":{"description":"Approved JioSaavn HTTPS share link; use instead of id","format":"uri","type":"string"}},{"in":"query","name":"page","required":false,"schema":{"default":1,"maximum":10000,"minimum":1,"type":"integer"}},{"in":"query","name":"limit","required":false,"schema":{"default":10,"maximum":100,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Success"}}},"description":"Successful operation"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"JSON error envelope; see HTTP status"}},"summary":"Get metadata by ID or share link"}},"/albums/{id}":{"get":{"parameters":[{"in":"path","name":"id","required":true,"schema":{"pattern":"^[A-Za-z0-9_-]{1,128}$","type":"string"}},{"in":"query","name":"page","required":false,"schema":{"default":1,"maximum":10000,"minimum":1,"type":"integer"}},{"in":"query","name":"limit","required":false,"schema":{"default":10,"maximum":100,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Success"}}},"description":"Successful operation"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"JSON error envelope; see HTTP status"}},"summary":"Get content details"}},"/artists":{"get":{"parameters":[{"in":"query","name":"id","required":false,"schema":{"type":"string"}},{"in":"query","name":"link","required":false,"schema":{"description":"Approved JioSaavn HTTPS share link; use instead of id","format":"uri","type":"string"}},{"in":"query","name":"page","required":false,"schema":{"default":1,"maximum":10000,"minimum":1,"type":"integer"}},{"in":"query","name":"limit","required":false,"schema":{"default":10,"maximum":100,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Success"}}},"description":"Successful operation"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"JSON error envelope; see HTTP status"}},"summary":"Get metadata by ID or share link"}},"/artists/{id}":{"get":{"parameters":[{"in":"path","name":"id","required":true,"schema":{"pattern":"^[A-Za-z0-9_-]{1,128}$","type":"string"}},{"in":"query","name":"page","required":false,"schema":{"default":1,"maximum":10000,"minimum":1,"type":"integer"}},{"in":"query","name":"limit","required":false,"schema":{"default":10,"maximum":100,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Success"}}},"description":"Successful operation"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"JSON error envelope; see HTTP status"}},"summary":"Get content details"}},"/artists/{id}/albums":{"get":{"parameters":[{"in":"path","name":"id","required":true,"schema":{"pattern":"^[A-Za-z0-9_-]{1,128}$","type":"string"}},{"in":"query","name":"page","required":false,"schema":{"default":1,"maximum":10000,"minimum":1,"type":"integer"}},{"in":"query","name":"limit","required":false,"schema":{"default":10,"maximum":100,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Success"}}},"description":"Successful operation"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"JSON error envelope; see HTTP status"}},"summary":"Get related content"}},"/artists/{id}/songs":{"get":{"parameters":[{"in":"path","name":"id","required":true,"schema":{"pattern":"^[A-Za-z0-9_-]{1,128}$","type":"string"}},{"in":"query","name":"page","required":false,"schema":{"default":1,"maximum":10000,"minimum":1,"type":"integer"}},{"in":"query","name":"limit","required":false,"schema":{"default":10,"maximum":100,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Success"}}},"description":"Successful operation"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"JSON error envelope; see HTTP status"}},"summary":"Get related content"}},"/auth/login":{"post":{"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Login"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Success"}}},"description":"Successful operation"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"JSON error envelope; see HTTP status"}},"security":[],"summary":"Create a 12-hour HttpOnly same-site owner session"}},"/auth/logout":{"post":{"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Success"}}},"description":"Successful operation"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"JSON error envelope; see HTTP status"}},"summary":"Clear this browser's owner cookie"}},"/auth/session":{"get":{"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Success"}}},"description":"Successful operation"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"JSON error envelope; see HTTP status"}},"summary":"Inspect the owner browser session"}},"/downloads":{"get":{"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Success"}}},"description":"Successful operation"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"JSON error envelope; see HTTP status"}},"summary":"Owner: list durable job history"},"post":{"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DownloadRequest"}}},"required":true},"responses":{"202":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Success"}}},"description":"Successful operation"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"JSON error envelope; see HTTP status"}},"summary":"Owner: enqueue selected songs (duplicates reuse history)"}},"/downloads/{id}":{"delete":{"parameters":[{"in":"path","name":"id","required":true,"schema":{"pattern":"^[A-Za-z0-9_-]{1,128}$","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Success"}}},"description":"Successful operation"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"JSON error envelope; see HTTP status"}},"summary":"Owner: cancel a job; never delete a completed download"},"get":{"parameters":[{"in":"path","name":"id","required":true,"schema":{"pattern":"^[A-Za-z0-9_-]{1,128}$","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Success"}}},"description":"Successful operation"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"JSON error envelope; see HTTP status"}},"summary":"Owner: inspect one job"}},"/downloads/{id}/file":{"delete":{"parameters":[{"in":"path","name":"id","required":true,"schema":{"pattern":"^[A-Za-z0-9_-]{1,128}$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteFileRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Success"}}},"description":"Successful operation"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"JSON error envelope; see HTTP status"}},"summary":"Owner: delete this confirmed completed file and empty parent folders below the download root; clear its stale entry if already absent, otherwise retain history"}},"/downloads/{id}/retry":{"post":{"parameters":[{"in":"path","name":"id","required":true,"schema":{"pattern":"^[A-Za-z0-9_-]{1,128}$","type":"string"}}],"responses":{"202":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Success"}}},"description":"Successful operation"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"JSON error envelope; see HTTP status"}},"summary":"Owner: retry a failed or cancelled job"}},"/health":{"get":{"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Success"}}},"description":"Successful operation"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"JSON error envelope; see HTTP status"}},"security":[],"summary":"Public liveness; not a cloud-upload health assertion"}},"/openapi.json":{"get":{"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"Successful operation"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"JSON error envelope; see HTTP status"}},"security":[],"summary":"Read this public OpenAPI document (not wrapped in a success envelope)"}},"/playback/{id}":{"get":{"parameters":[{"in":"path","name":"id","required":true,"schema":{"pattern":"^[A-Za-z0-9_-]{1,128}$","type":"string"}},{"in":"query","name":"quality","required":false,"schema":{"default":"best","enum":["best","320","160","96","48","12"],"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Success"},{"properties":{"data":{"$ref":"#/components/schemas/Playback"}}}]}}},"description":"Successful operation"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"JSON error envelope; see HTTP status"}},"summary":"Resolve and HEAD-verify an ordinary CDN audio URL; no audio is downloaded"}},"/playlists":{"get":{"parameters":[{"in":"query","name":"id","required":false,"schema":{"type":"string"}},{"in":"query","name":"link","required":false,"schema":{"description":"Approved JioSaavn HTTPS share link; use instead of id","format":"uri","type":"string"}},{"in":"query","name":"page","required":false,"schema":{"default":1,"maximum":10000,"minimum":1,"type":"integer"}},{"in":"query","name":"limit","required":false,"schema":{"default":10,"maximum":100,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Success"}}},"description":"Successful operation"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"JSON error envelope; see HTTP status"}},"summary":"Get metadata by ID or share link"}},"/playlists/{id}":{"get":{"parameters":[{"in":"path","name":"id","required":true,"schema":{"pattern":"^[A-Za-z0-9_-]{1,128}$","type":"string"}},{"in":"query","name":"page","required":false,"schema":{"default":1,"maximum":10000,"minimum":1,"type":"integer"}},{"in":"query","name":"limit","required":false,"schema":{"default":10,"maximum":100,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Success"}}},"description":"Successful operation"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"JSON error envelope; see HTTP status"}},"summary":"Get content details"}},"/search":{"get":{"parameters":[{"in":"query","name":"query","required":true,"schema":{"maxLength":512,"minLength":1,"type":"string"}},{"in":"query","name":"page","required":false,"schema":{"default":1,"maximum":10000,"minimum":1,"type":"integer"}},{"in":"query","name":"limit","required":false,"schema":{"default":10,"maximum":100,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Success"}}},"description":"Successful operation"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"JSON error envelope; see HTTP status"}},"summary":"Search the direct JioSaavn backend"}},"/search/albums":{"get":{"parameters":[{"in":"query","name":"query","required":true,"schema":{"maxLength":512,"minLength":1,"type":"string"}},{"in":"query","name":"page","required":false,"schema":{"default":1,"maximum":10000,"minimum":1,"type":"integer"}},{"in":"query","name":"limit","required":false,"schema":{"default":10,"maximum":100,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Success"}}},"description":"Successful operation"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"JSON error envelope; see HTTP status"}},"summary":"Search the direct JioSaavn backend"}},"/search/artists":{"get":{"parameters":[{"in":"query","name":"query","required":true,"schema":{"maxLength":512,"minLength":1,"type":"string"}},{"in":"query","name":"page","required":false,"schema":{"default":1,"maximum":10000,"minimum":1,"type":"integer"}},{"in":"query","name":"limit","required":false,"schema":{"default":10,"maximum":100,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Success"}}},"description":"Successful operation"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"JSON error envelope; see HTTP status"}},"summary":"Search the direct JioSaavn backend"}},"/search/playlists":{"get":{"parameters":[{"in":"query","name":"query","required":true,"schema":{"maxLength":512,"minLength":1,"type":"string"}},{"in":"query","name":"page","required":false,"schema":{"default":1,"maximum":10000,"minimum":1,"type":"integer"}},{"in":"query","name":"limit","required":false,"schema":{"default":10,"maximum":100,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Success"}}},"description":"Successful operation"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"JSON error envelope; see HTTP status"}},"summary":"Search the direct JioSaavn backend"}},"/search/songs":{"get":{"parameters":[{"in":"query","name":"query","required":true,"schema":{"maxLength":512,"minLength":1,"type":"string"}},{"in":"query","name":"page","required":false,"schema":{"default":1,"maximum":10000,"minimum":1,"type":"integer"}},{"in":"query","name":"limit","required":false,"schema":{"default":10,"maximum":100,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Success"}}},"description":"Successful operation"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"JSON error envelope; see HTTP status"}},"summary":"Search the direct JioSaavn backend"}},"/settings":{"get":{"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Success"}}},"description":"Successful operation"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"JSON error envelope; see HTTP status"}},"summary":"Owner: inspect download configuration and readiness; keys are never returned"},"put":{"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Settings"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Success"}}},"description":"Successful operation"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"JSON error envelope; see HTTP status"}},"summary":"Owner: persist download settings; existing jobs keep their original destination"}},"/songs":{"get":{"parameters":[{"in":"query","name":"id","required":false,"schema":{"type":"string"}},{"in":"query","name":"link","required":false,"schema":{"description":"Approved JioSaavn HTTPS share link; use instead of id","format":"uri","type":"string"}},{"in":"query","name":"ids","required":false,"schema":{"description":"Comma-separated IDs, at most 100; alternative to id or link","type":"string"}},{"in":"query","name":"page","required":false,"schema":{"default":1,"maximum":10000,"minimum":1,"type":"integer"}},{"in":"query","name":"limit","required":false,"schema":{"default":10,"maximum":100,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Success"}}},"description":"Successful operation"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"JSON error envelope; see HTTP status"}},"summary":"Get metadata by ID or share link"}},"/songs/{id}":{"get":{"parameters":[{"in":"path","name":"id","required":true,"schema":{"pattern":"^[A-Za-z0-9_-]{1,128}$","type":"string"}},{"in":"query","name":"page","required":false,"schema":{"default":1,"maximum":10000,"minimum":1,"type":"integer"}},{"in":"query","name":"limit","required":false,"schema":{"default":10,"maximum":100,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Success"}}},"description":"Successful operation"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"JSON error envelope; see HTTP status"}},"summary":"Get content details"}},"/songs/{id}/suggestions":{"get":{"parameters":[{"in":"path","name":"id","required":true,"schema":{"pattern":"^[A-Za-z0-9_-]{1,128}$","type":"string"}},{"in":"query","name":"page","required":false,"schema":{"default":1,"maximum":10000,"minimum":1,"type":"integer"}},{"in":"query","name":"limit","required":false,"schema":{"default":10,"maximum":100,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Success"}}},"description":"Successful operation"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"JSON error envelope; see HTTP status"}},"summary":"Get related content"}},"/stream/{id}":{"get":{"parameters":[{"in":"path","name":"id","required":true,"schema":{"pattern":"^[A-Za-z0-9_-]{1,128}$","type":"string"}},{"in":"query","name":"quality","required":false,"schema":{"default":"best","enum":["best","320","160","96","48","12"],"type":"string"}}],"responses":{"307":{"description":"Temporary redirect to the verified HTTPS CDN URL; no phone audio proxy","headers":{"Location":{"schema":{"format":"uri","type":"string"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"JSON error envelope; see HTTP status"}},"summary":"Redirect directly to CDN; do not forward API credentials to the redirected host"}}},"security":[{"apiKey":[]},{"bearer":[]},{"session":[]}],"servers":[{"url":"/api"}]}
