API Reference

Media Control

Control media playback and get now-playing info.

Experimental

Media endpoints are experimental and may change in future versions.

The media endpoints allow you to control system-wide media playback and retrieve information about what's currently playing.

Endpoints

MethodEndpointDescription
GET/api/media/statusGet current media playback info.
POST/api/media/controlControl media playback.

Get Media Status

Returns information about the currently playing media.

Request

Request
curl http://192.168.1.100:9990/api/media/status

Response Schema

Response
{
    "status": "active",
    "title": "Song Name",
    "artist": "Artist Name"
}

Field Reference

FieldTypeDescription
statusstringCurrent status (see values below).
titlestringCurrent track title.
artiststringCurrent artist name.

Status Values

ValueDescription
activeMedia is playing or paused with metadata available.
idleSession exists but no metadata.
stoppedNo active media session.

Limitations

On Windows, the status returns "active" for both playing and paused states. Detecting exact play/pause state requires complex WinRT integration.


Control Media Playback

Send commands to control media playback.

Request

curl -X POST http://192.168.1.100:9990/api/media/control \
  -H "Content-Type: application/json" \
  -d '{"action": "play"}'

Request Body

{
    "action": "play"
}

Supported Actions

ActionDescription
playResume playback / Play.
pausePause playback.
nextSkip to next track.
prevGo to previous track.

Response

{
    "status": "ok"
}

System-Wide Control

Media controls work with any application that responds to system media keys, including Spotify, Chrome, VLC, and more.

On this page