Availability: the control API ships in the next LookPilot release (after 1.9.17). If the discovery file described below does not appear when the app runs, your version does not have it yet; update LookPilot.
LookPilot runs a local control API that lets external tools trigger tracker actions: Stream Deck buttons, AutoHotkey scripts, voice command tools like VoiceAttack, or anything that can make an HTTP request. The in-app hotkeys keep working; the control API is an addition, not a replacement.
| Action | What it does |
|---|---|
center |
Center tracking (same as the in-app Center hotkey) |
toggle |
Start / stop tracking |
pause |
Pause tracking (freezes the view at the current pose) |
set-game-center |
Save the current pose as the game-center offset |
status |
Get tracking state as JSON |
ping |
Check that LookPilot is running |
On startup LookPilot writes a discovery file at %APPDATA%\lookpilot\control.json containing the API port and an access token:
{"app": "LookPilot", "port": 41417, "token": "<random per app start>"}
Any tool can read that file and call the API on 127.0.0.1. PowerShell example:
$c = Get-Content "$env:APPDATA\lookpilot\control.json" | ConvertFrom-Json
Invoke-RestMethod -Method Post -Uri "http://127.0.0.1:$($c.port)/api/center" -Headers @{Authorization = "Bearer $($c.token)"}
Endpoints: POST /api/center, POST /api/toggle, POST /api/pause, POST /api/set-game-center, GET /api/status, GET /api/ping (ping needs no token). The token can also be passed as a ?token= query parameter, which is handy for tools that only let you configure a URL.
The API only listens on 127.0.0.1 (your own machine) and every request except ping needs the token, so nothing on your network can control the tracker.
Use any "HTTP request" / "API request" plugin from the Stream Deck store:
%APPDATA%\lookpilot\control.json (open it in Notepad).http://127.0.0.1:<port>/api/center?token=<token> with method POST.Note that the token changes each time LookPilot starts. For a set-and-forget setup, point the button at a small PowerShell script (saved as a .ps1 file with the snippet above) instead of a raw URL, so the token is read fresh on every press.
; Ctrl+Alt+C centers tracking
^!c::
Run, powershell -WindowStyle Hidden -Command "$c = Get-Content \"$env:APPDATA\lookpilot\control.json\" | ConvertFrom-Json; Invoke-RestMethod -Method Post -Uri \"http://127.0.0.1:$($c.port)/api/center\" -Headers @{Authorization = \"Bearer $($c.token)\"}",, Hide
return
LOOKPILOT_CONTROL_DISABLED=1.