API reference

The HTTP API the app uses, for custom clients and tools.

All routes are under /v1. Request and response types come from the shared glyph-protocol crate. Errors are JSON ApiError objects with a code.

Headers

HeaderWhen
x-glyph-install-idalways; an anonymous id per installation, used for rate limits
Authorization: Bearer <access token>signed in
X-Glyph-Server-Authorization: Bearer <token>on a private server

Rate-limited answers are HTTP 429 with retry_after_s and Retry-After.

Music

MethodPathDoes
GET/v1/healthversion, protocol, active sources, accounts, account_required, server_auth_required
GET/v1/search?q=NDJSON stream of results, provider_error and done events
POST/v1/resolveResolveRequest → playback source
GET/v1/audio/:provider/:idaudio stream with byte ranges; ?quality=low|standard|high
POST/v1/downloadtrack → download reference, or null if not allowed
GET/v1/download/:provider/:iddownload stream
GET/v1/lyrics?title=&artist=&album=&duration=lyrics from LRCLIB; duration in seconds
GET/v1/similar?artist=&title=similar songs (Last.fm)
POST/v1/import/spotify{url} of a public Spotify, Deezer or YouTube playlist, a SoundCloud link (set, likes, tracks, song) or a Last.fm profile
POST/v1/covertrack → cover URL

A search result keeps its source and id. If another source finds the same song later, the track is sent again with more ids; replace it by (source, id).

Sharing

MethodPathDoes
POST/v1/sharesigned in: create a short link
GET / DELETE/v1/share/:idread; the owner can delete
GET/p/:idlanding page of a short link

Accounts and sync

MethodPathDoes
POST/v1/account/login/start, /v1/account/login/pollbrowser sign-in for apps
POST/v1/account/token/refreshnew access token
GET/v1/account/handle/:his a handle free
GET / PATCH / DELETE/v1/accountread, change handle, delete account
GET / PATCH / DELETE/v1/devices, /v1/devices/:idlist, rename, remove devices
POST/v1/sync/pushsend changed items
GET/v1/sync/pull?since=&limit=items newer than a revision
GET/v1/sync/exportall items as JSON
GET / PATCH/v1/profileown profile settings
GET/v1/profiles/:handleanother user's public profile (signed in)

Sync items

Everything that syncs is an item (kind, key) → value. The newer updated_at wins; deletions are tombstones.

{ "kind": "liked", "key": "audius:Abc12", "value": { "title": "..." },
  "updated_at": 1760700000000, "deleted": false, "rev": 412 }
kindkey
liked, downloadtrack key
playlistplaylist id
followed, hiddenartist name, lowercase
albumtitle|artist, lowercase
searchtrack key or artist:name
settingsettings section

A push takes at most 500 items and 2 MB. A pull with a revision older than 180 days answers {reset: true}; the client then pulls everything again.

edit this page on github · markdown

up down choose · enter open · esc closellms.txt