https://api.getmelody.io
Authenticated requests must include:
1. Playback Protocol (Read / Write)
Select the active playback protocol before issuing any control commands, viaGET/POST /device/mode.
HSC — Haptic Script Control
Transport: WiFi onlyBehavior: the device plays a funscript that you upload first; the server then orchestrates timeline playback. Playback is a two-step flow: 1. Upload the script —
POST /device/hsc/upload (up to 10 MB):
2. Start playback —
POST /device/hsc/start:
server_time_ms is optional; time is required. Seek, pause, and stop are POST /device/hsc/{seek,pause,stop}.
Script Status (Read) — GET /device/hsc/status
HDC — Haptic Direct Control
Transport: WiFi, BLEBehavior: Immediate position control. Every new command interrupts active movement.
Motion Command (Write)
Motion Status (Read) — GET /device/hdc/status
HPS — Haptic Points Stream
Transport: WiFi, BLE Behavior: Stream sequential position + timestamp points. The device calculates velocity using time-delta differences between points. Requirements:- Minimum 2 points required for velocity calculation
- Over WiFi, up to 10,000 points per
POST /device/hps/signalrequest (the 64-points-per-write limit applies to BLE only)
Add Points (Write)
Points travel inside apoints array — the body is {"points": [{"time": …, "pos": …}, …]}, not a
bare point.
Note: If time delta between points is negative, the previous point timestamp is treated as 0.
Play Stream (Write)
Starts stream playback using buffered points. Accepts an optionalloop (bool) field to replay
the buffer.
Pause Stream (Write)
Pauses without clearing the buffer.Flush Stream (Write)
Clears the buffered point queue.Stream Status (Read) — GET /device/hps/status
HLC — Haptic Loop Control
Transport: WiFi, BLE Behavior: Automatic, repeating up/down stroking loop inside a defined range.Set Loop Parameters (Write)
Equal limits are accepted — the check is
low_limit > high_limit, so a zero-width range is not an
error. Every bound above is validated server-side and answered with 400 and a message naming the
field.
Start Loop (Write)
Begins automatic haptic loop.Pause Loop (Write)
Pauses the loop, keeping the configured range and velocity.Stop Loop (Write)
Stops loop playback safely and clears active loop state.Loop Status (Read) — GET /device/hlc/status
Summary
Set the protocol first, then send its commands. Full request and response schemas are in the
Melody API Reference.