BingeBop

HTTP API Reference Manual
Port 18080 · Version 1.0 · August 2026
Online: bingebop.com/guide/api.html

Table of Contents

1. Overview

BingeBop exposes an HTTP API on port 18080 of the device's LAN IP. All endpoints return JSON (Content-Type: application/json) and support CORS.

The API allows you to:

🤖 Agent Discovery Call GET /api/describe to receive a machine-readable catalog of every endpoint, step-by-step workflows, and the full settings reference. This is the recommended entry point for AI agents and automation tools.

Base URL

http://<device-ip>:18080

Find the device IP in Settings → Network on the TV, or via your router's client list.

2. Authentication

The API uses a token-based authentication system with three tiers. Find the token in Settings → LAN API Access on your TV.

TierToken RequiredAccess Level
OPEN None Read-only status, display modes, search, device profile
REMOTE 4-character prefix
(shown on QR code)
Playback control, input, favourites, recordings
ELEVATED Full 12-character token Settings, data sources, backup, users, credentials

Sending the Token

Include the token as a query parameter or HTTP header:

# HTTP header (recommended)
curl -H "X-Api-Token: AB3KQ7M2X9V4" "http://192.168.1.50:18080/api/settings"

# Query parameter (discouraged — token appears in logs/history)
curl "http://192.168.1.50:18080/api/settings?token=AB3KQ7M2X9V4"
📝 Best Practice Always prefer the X-Api-Token header over the query parameter. Tokens in URLs are visible in shell history, browser history, HTTP access logs, and reverse-proxy logs. For POST endpoints, send credentials in the request body, not the URL.
⚠️ Security The full token grants access to credentials and settings. Never share it outside your local network. The 4-character QR prefix is safe for phone remotes — it cannot access credentials.

Error Responses

StatusBodyMeaning
401{"error":"unauthorized","hint":"..."}Missing or wrong token
403{"error":"insufficient_token","hint":"..."}Endpoint needs the full token, but only the prefix was sent
429{"error":"too_many_attempts","retry_after":N}Brute-force protection — wait N seconds

3. Quick-Start Workflows

Add an Xtream Codes IPTV Provider

  1. Create the source:
    POST /api/data_source?type=xtream&url=http://provider:port&username=USER&password=PASS
  2. Check import status:
    GET /api/data_sources — poll until refresh_status is complete (10–60 s)
  3. Verify channels imported:
    GET /api/search?q=BBC
  4. Tune to a channel:
    GET /api/play_channel?id=<id-from-search>

Add an M3U Playlist

  1. POST /api/data_source?type=m3u&url=http://host/playlist.m3u&name=My+Playlist
  2. GET /api/data_sources — wait for import to complete

Add an HDHomeRun Tuner

  1. POST /api/data_source?type=hdhomerun&url=192.168.1.100&name=Living+Room

Add a Stalker / MAG Portal

  1. POST /api/data_source?type=stalker&url=http://portal.example.com/c/&mac=00:1A:79:XX:XX:XX

Configure Network Storage (Samba/NAS)

  1. Test the connection:
    GET /api/storage/test?host=192.168.1.10&share=media&username=user&password=pass
  2. Save each setting:
    GET /api/setting?key=local:samba_host&value=192.168.1.10
    GET /api/setting?key=local:samba_share&value=media
    GET /api/setting?key=local:samba_username&value=user
    GET /api/setting?key=local:samba_password&value=pass
  3. Switch to network storage:
    GET /api/setting?key=local:storage_type&value=samba

Create User Profiles

  1. GET /api/user/add?name=Kids&child=true
  2. GET /api/user/switch?user_id=<id>
  3. GET /api/user/list — see all profiles

Pair Devices into a Household

  1. On device A: GET /api/peers — find discoverable clusters
  2. On device A: GET /api/peer/initiate_join?cluster_id=<id>
  3. On device B: GET /api/peer/list_pending
  4. On device B: GET /api/peer/approve_pair?device_uuid=<uuid>

Backup & Restore

  1. Export: GET /api/backup/export?password=MySecret
  2. Validate: GET /api/backup/restore_stage?password=MySecret
  3. Apply (destructive!): GET /api/backup/restore_apply?password=MySecret

4. Discovery & Search

GET /api/describe OPEN

Returns the complete API catalog as structured JSON — endpoints, parameters, workflows, and settings reference. This is the recommended entry point for AI agents and automation tools.

GET /api/status OPEN

Returns the current playback state: what's playing, codec, resolution, stream position, device UUID, etc. Returns {"error":"No player active"} with HTTP 404 when nothing is playing.

GET /api/search OPEN

Search the catalog by name. Returns channels, movies, series, and EPG programmes.

ParameterRequiredDescription
qYesSearch query (e.g. BBC, Breaking Bad)
limitNoMax results, 1–200 (default: 30)
typeNoFilter by entity: channel, movie, series, epg
mediaNoFilter by media: live, movie, series

Response

{
  "q": "BBC",
  "elapsed_ms": 12,
  "count": 5,
  "results": [
    {
      "type": "media",
      "id": 4521,
      "media": "c",
      "name": "BBC One HD",
      "poster": "http://...",
      "channel_id": "bbc1.uk"
    }
  ]
}
💡 Tip The id field is the media_container ID — use it with /api/play_channel, /api/play_movie, /api/favourite, etc.
GET /api/device/profile OPEN

Returns the device's hardware tier (FLOOR / LOW / MID / HIGH), capability manifest, and current provisioned settings.

5. Data Source Management

POST /api/data_source ELEVATED

Add a new IPTV data source. Supports four provider types. Parameters can be sent as query string or form body.

ParameterRequiredDescription
typeYesxtream, m3u, hdhomerun, or stalker
urlYesProvider URL (or device IP for HDHomeRun)
usernameXtream onlyXtream Codes username
passwordXtream onlyXtream Codes password
macStalker onlyMAC address (e.g. 00:1A:79:XX:XX:XX)
loginNoStalker portal login (optional)
nameNoDisplay name for the source

Example

# Xtream Codes provider (recommended: header auth + form body)
curl -X POST -H "X-Api-Token: AB3KQ7M2X9V4" \
  "http://tv:18080/api/data_source" \
  -d "type=xtream&url=http://provider.com:8080&username=myuser&password=mypass&name=My+IPTV"

# M3U playlist
curl -X POST -H "X-Api-Token: AB3KQ7M2X9V4" \
  "http://tv:18080/api/data_source" \
  -d "type=m3u&url=http://example.com/channels.m3u"

# Query params also accepted (discouraged — credentials visible in logs)
curl -X POST "http://tv:18080/api/data_source?type=m3u&url=http://example.com/channels.m3u&token=AB3KQ7M2X9V4"

Response

{"success":true, "id":3, "type":"xtream", "name":"My IPTV", "refresh":"started"}

The source starts importing immediately. Poll /api/data_sources to check progress.

DELETE /api/data_source ELEVATED

Remove a data source and all its channels, credentials, and MACs.

ParameterRequiredDescription
idYesData source ID (from /api/data_sources)
curl -X DELETE -H "X-Api-Token: AB3KQ7M2X9V4" "http://tv:18080/api/data_source?id=3"
GET /api/data_sources ELEVATED

List all configured data sources with their type, URL, EPG priority, refresh status, and (for Xtream) account info (username, expiry date, max connections, active connections).

GET /api/data_source/refresh ELEVATED

Trigger a channel re-import for a single data source.

ParameterRequiredDescription
idYesData source ID
GET /api/data_source/url ELEVATED

Change a source's base URL (e.g. migrate to a mirror host). Cluster-synced.

ParameterRequiredDescription
idYesData source ID
valueYesNew URL
GET /api/data_source/country ELEVATED

Set the country (ISO code) for a data source, used for channel-name normalization.

ParameterRequiredDescription
idYesData source ID
valueYesISO country code (e.g. UK, US, DE)
GET /api/data_source/epg_priority ELEVATED

Set the EPG priority for a data source (lower number = higher priority when multiple sources provide guide data).

6. Playback Control

GET /api/play REMOTE

Play a stream URL directly.

ParameterRequiredDescription
urlYesStream URL to play
playNotrue to start playback immediately (default: false, creates proxy only)
streamNoStream slot 1–4 for multi-view (default: 1)
curl -H "X-Api-Token: ABCD" "http://tv:18080/api/play?url=http://stream.example.com/live.ts&play=true"
GET /api/play_channel REMOTE

Tune to a channel by its catalog ID. Use /api/search to find the ID.

ParameterRequiredDescription
idYesmedia_container ID
GET /api/play_movie REMOTE

Play a movie by catalog ID through the full StreamRouter path (source selection, failover).

ParameterRequiredDescription
idYesmedia_container ID (use /api/search?media=movie to find it)
GET /api/play_episode REMOTE

Play a series episode by catalog ID.

ParameterRequiredDescription
idYesmedia_container ID
resume_msNoResume position in milliseconds
GET /api/pause REMOTE

Pause playback.

GET /api/resume REMOTE

Resume playback.

GET /api/live REMOTE

Jump back to the live edge (exits timeshift).

GET /api/seek_forward REMOTE

Seek forward in the current stream.

ParameterRequiredDescription
secondsNoSeconds to skip (default: 10)
GET /api/seek_backward REMOTE

Seek backward in the current stream.

ParameterRequiredDescription
secondsNoSeconds to skip back (default: 10)
GET /api/speed REMOTE

Change playback speed.

ParameterRequiredDescription
speedNoSpeed multiplier: 0.25–4.0 (default: 1.0)
GET /api/av_sync REMOTE

Adjust the audio-video synchronization offset.

ParameterRequiredDescription
offsetNoOffset in milliseconds (positive = delay audio, default: 0)
GET /api/stop REMOTE

Stop a specific stream slot.

ParameterRequiredDescription
streamNoStream slot 1–4 (default: 1)

7. Display & Layout

GET /api/display_modes OPEN

List all supported display modes with id, width, height, refreshRate, and active flag.

GET /api/display_mode REMOTE

Switch to a specific display mode.

ParameterRequiredDescription
idYesMode ID from /api/display_modes
GET /api/layout REMOTE

Set the compositor layout for multi-stream viewing.

ParameterRequiredDescription
layoutYesfullscreen/0, pip/1, side_by_side/2, quad/3
GET /api/focus REMOTE

Set which stream slot has focus in PIP mode.

ParameterRequiredDescription
streamNoStream slot 1–4 (default: 1)

8. Audio & Subtitles

GET /api/audio/list OPEN

List audio tracks for the current stream. Returns trackIndex, language, label, mimeType, channels, bitrate, isSelected.

GET /api/audio/select REMOTE

Select an audio track.

ParameterRequiredDescription
trackYes0-based track index (-1 to disable audio)
GET /api/audio/current OPEN

Returns the currently selected audio track, or null.

GET /api/subtitles/tracks OPEN

List subtitle tracks for the current stream. Returns trackIndex, language, label, mimeType, isSelected.

GET /api/subtitles/select REMOTE

Select a subtitle track.

ParameterRequiredDescription
trackYes0-based track index (-1 to disable subtitles)
GET /api/subtitles/languages OPEN

List available OCR languages and their download status.

GET /api/subtitles/languages/download REMOTE

Download OCR tessdata for a language.

ParameterRequiredDescription
langYesLanguage code (from /api/subtitles/languages)

9. Library & Favourites

GET /api/favourite REMOTE

Add or remove a channel from the user's favourites.

ParameterRequiredDescription
channel_idYesmedia_container ID
valueNotrue to add (default), false to remove
user_idNoUser profile ID (default: current user)
GET /api/watchlist REMOTE

Add or remove a VOD title from the user's watchlist ("My List").

ParameterRequiredDescription
container_idYesmedia_container ID of the movie or series
valueNotrue to add (default), false to remove
user_idNoUser profile ID (must be > 0)
GET /api/channel/rename ELEVATED

Set a custom display name for a channel (user override — does not change the source data).

ParameterRequiredDescription
idYesmedia_container ID
nameYesNew display name
user_idNoUser ID (default: 0 = cluster-wide override)

10. User Profiles

GET /api/user/list ELEVATED

List all user profiles with their IDs, names, and child flags. Also returns active_user_id.

GET /api/user/add ELEVATED

Create a new user profile.

ParameterRequiredDescription
nameYesProfile display name
childNotrue for a child profile (parental controls apply). Default: false
curl -H "X-Api-Token: AB3KQ7M2X9V4" "http://tv:18080/api/user/add?name=Kids&child=true"
→ {"success":true, "id":2, "uuid":"a1b2c3...", "name":"Kids", "child":true}
GET /api/user/switch ELEVATED

Switch the active user profile. Returns 404 if the user ID doesn't exist.

ParameterRequiredDescription
user_idYesUser ID from /api/user/list (0 = Owner)

11. DVR Recording

GET /api/recording/start REMOTE

Start recording the currently-playing channel.

ParameterRequiredDescription
titleNoRecording title (defaults to channel name)
GET /api/recording/stop REMOTE

Stop a recording.

ParameterRequiredDescription
uuidYesRecording UUID (from /api/recording/list)
GET /api/recording/list OPEN

List all recordings with their UUIDs, titles, durations, and status.

GET /api/recording/play REMOTE

Play back a recording.

ParameterRequiredDescription
uuidYesRecording UUID
GET /api/recording/delete REMOTE

Delete a recording.

ParameterRequiredDescription
uuidYesRecording UUID
GET /api/recording/schedule REMOTE

Create, list, or cancel scheduled recordings.

ParameterRequiredDescription
opNocreate (default), list, or cancel
channelCreateChannel media_container ID
kindCreateprogramme or interval
startIntervalStart time (epoch seconds)
endIntervalEnd time (epoch seconds)
uuidCancelSchedule UUID to cancel
GET /api/reminder REMOTE

Set, list, or cancel reminders for upcoming programmes.

ParameterRequiredDescription
opNocreate (default), list, or cancel
channelCreateChannel media_container ID
kindCreateprogramme or series
uuidCancelReminder UUID to cancel

12. EPG & Channel Configuration

GET /api/epg/sync REMOTE

Trigger an urgent EPG guide data refresh. EPG also refreshes automatically every few hours.

GET /api/epg_pin/set REMOTE

Pin a channel to a specific EPG source (overrides automatic matching).

ParameterRequiredDescription
media_container_idYesChannel ID
channel_idYesXMLTV channel ID
data_source_uuidYesEPG data source UUID
GET /api/epg_pin/clear REMOTE

Remove an EPG pin (revert to automatic matching).

ParameterRequiredDescription
media_container_idYesChannel ID
GET /api/epg_pin/status OPEN

Check EPG pin status for a channel — returns active pin, persisted pin, and total pin count.

13. Settings

GET /api/settings ELEVATED

Get all settings and their current values for the active user. Returns user_id and a settings object.

GET /api/setting ELEVATED

Read or write a single setting.

ParameterRequiredDescription
keyYesSetting key (see Chapter 19)
valueNoNew value to set. Omit to read the current value.
# Read a setting
curl -H "X-Api-Token: AB3KQ7M2X9V4" "http://tv:18080/api/setting?key=local:scaling_method"
→ {"key":"local:scaling_method", "value":"0"}

# Write a setting
curl -H "X-Api-Token: AB3KQ7M2X9V4" "http://tv:18080/api/setting?key=local:scaling_method&value=2"
→ {"success":true, "key":"local:scaling_method", "value":"2"}
GET /api/device/setting ELEVATED

Read or write a device-global (local:) setting, always stored under user 0. Use this instead of /api/setting for device-level config that shouldn't vary per user.

ParameterRequiredDescription
keyYesSetting key (typically local:...)
valueNoNew value to set. Omit to read.
GET /api/device/provision ELEVATED

Apply (or re-apply) the per-tier device manifest into settings. With ?force=true, re-seeds all tier defaults.

14. Storage

GET /api/storage/test ELEVATED

Test a Samba/NAS storage connection without changing any settings.

ParameterRequiredDescription
hostYesServer IP or hostname
shareYesShare name
pathNoSubdirectory (default: bingebop/segments)
usernameNoLogin username
passwordNoLogin password
domainNoWindows domain/workgroup

Response

{"success":true, "message":"Connected successfully"}
{"success":false, "message":"Connection timed out"}
GET /api/fs/roots ELEVATED

List available filesystem roots (local storage, USB, Samba shares).

GET /api/fs/list ELEVATED

List files and directories at a given path.

15. Backup & Restore

GET /api/backup/export ELEVATED

Create an encrypted backup ZIP containing all settings, data sources, and credentials.

ParameterRequiredDescription
passwordNoCustom encryption password (uses built-in default if omitted)

Response

{"ok":true, "path":"/data/.../bingebop-backup.zip", "bytes":524288, "tables":12, "encryption":"aes256"}
GET /api/backup/restore_stage ELEVATED

Decrypt and validate a backup file without applying it. Use this to check a backup before restoring.

ParameterRequiredDescription
pathNoPath to backup ZIP (uses last export if omitted)
passwordNoDecryption password
GET /api/backup/restore_apply ELEVATED

Apply a backup and restart the app. This is destructive — it replaces the entire database.

ParameterRequiredDescription
pathNoPath to backup ZIP
passwordNoDecryption password
⚠️ Destructive Operation This wipes the current database and restarts the app. The API will be unreachable for several seconds during restart.

16. Household Cluster

BingeBop devices on the same network can be paired into a household cluster. Paired devices share settings, data sources, user profiles, favourites, and recordings automatically.

GET /api/peers OPEN

Returns the current cluster state: cluster ID/name, this device's UUID, list of paired peers, and discoverable clusters on the network.

GET /api/peer/initiate_join ELEVATED

Request to join a discovered cluster. The cluster owner must approve.

ParameterRequiredDescription
cluster_idYesCluster ID from /api/peers → available_clusters
GET /api/peer/list_pending ELEVATED

List pending join requests on this device.

GET /api/peer/approve_pair ELEVATED

Approve a pending join request.

ParameterRequiredDescription
device_uuidYesUUID of the requesting device

17. Remote Control & Navigation

GET /api/input REMOTE

Send a remote-control key press. Injects real Android KeyEvents — the native focus system handles navigation exactly like a physical remote.

ParameterRequiredDescription
keyYesKey name (see below)
long_pressNotrue for long press (default: false)
hold_msNoHold duration in ms (for Compose hold-timers)
valueNoText string (required when key=text)

Valid Keys

up, down, left, right, select, back, menu, enter, backspace, space, channel_up, channel_down, play_pause, az, 09, text

# Navigate down and select
curl -H "X-Api-Token: ABCD" "http://tv:18080/api/input?key=down"
curl -H "X-Api-Token: ABCD" "http://tv:18080/api/input?key=select"

# Type text into a focused field
curl -H "X-Api-Token: ABCD" "http://tv:18080/api/input?key=text&value=hello+world"

# Long press on a channel row
curl -H "X-Api-Token: ABCD" "http://tv:18080/api/input?key=select&long_press=true"
GET /api/input/text REMOTE

Read-back of the currently-focused text field. Returns the field name and current value. Sensitive fields (passwords) report active:true but withhold the value.

GET /api/nav/goto REMOTE

Navigate directly to a UI screen by route path.

ParameterRequiredDescription
pathYesRoute path, e.g. settings, settings/content/library_sources
focusNoFocus region: settings, custom, selector, textfield
GET /api/text/inject REMOTE

Set a text field's value by name (bypasses keyboard input).

ParameterRequiredDescription
nameYesField name (registered by BopTextField)
valueNoText value to set (empty to clear)
📱 Phone Remote Open http://<device-ip>:18080/remote in any phone browser for a virtual remote control with D-pad, media controls, numpad, and text input. No installation required.

18. Diagnostics & Logs

GET /api/logs ELEVATED

Read the diagnostic event log — errors, channel changes, codec issues, imports, cluster events. Data is PII-scrubbed.

ParameterRequiredDescription
severityNoMinimum severity: INFO, WARN, ERROR
categoryNoEPG, NETWORK, PLAYBACK, CODEC, SYSTEM, CLUSTER
limitNoMax rows, 1–5000 (default: 500)
sinceNoOnly events after this timestamp (epoch ms)
coalesceNotrue to collapse repeated events with a count
GET /api/diagnostics/network-path ELEVATED

Run a full network-path diagnostic: device → router → internet → source → stream. Takes 10–30 seconds. Returns hop-by-hop results including bandwidth measurement and per-source probes. Use a generous HTTP timeout (≥ 120 s).

19. Settings Reference

Use these keys with GET /api/setting?key=KEY&value=VALUE. Keys prefixed with local: are per-device and stored under user 0. Unprefixed keys are per-user and sync across clustered devices.

Playback

KeyTypeValues / DefaultDescription
local:scaling_methodint0=APP_SHADER, 1=APP_1080_TV, 2=TV_SCALING, 3=DEVICEVideo upscaling method
local:shader_algorithmintMEDIUM_BICUBICShader upscaling quality
local:match_frameratebooltrueMatch display refresh rate to video
local:tunneled_playbackboolfalseHardware A/V sync via tunneled playback
local:audio_output_channelsint0=AUTO, 1=PASSTHROUGH, 2=PCM_7.1, 3=PCM_5.1, 4=PCM_STEREOAudio output mode
local:overlay_autohide_secondsint5 (0=never)Seconds before playback overlay auto-hides
local:display_mode_resolution_floorint1080Minimum resolution during mode switches
local:display_mode_switch_delaylong(ms)Delay before switching down in resolution

Startup

KeyTypeValues / DefaultDescription
local:startup_destinationstringhome, last_channel, guide, specific_channelWhere app lands on cold start
local:startup_channel_idlong-1 (unset)Channel ID when startup_destination = specific_channel
local:auto_start_on_bootboolfalseAuto-launch on device boot
local:resume_last_channel_modestringlocal, syncedWhich last-played timeline to use

Storage

KeyTypeValues / DefaultDescription
local:storage_typestringlocal, sambaSegment storage backend
local:samba_hoststringSamba/NAS server IP or hostname
local:samba_sharestringSamba share name
local:samba_pathstringbingebop/segmentsSubdirectory within share
local:samba_usernamestringSamba login username
local:samba_passwordstringSamba login password
local:live_pause_enabledbooltrueEnable live-pause / timeshift

Subtitles

KeyTypeValues / DefaultDescription
subtitle_ocr_enabledbooltrueEnable OCR for bitmap subtitles (DVB/PGS → text)

Clock Overlay

KeyTypeValues / DefaultDescription
local:clock_overlay_enabledbooltrueShow clock overlay during playback
local:clock_overlay_sizestringsmall, normal, large, xlargeClock font size
local:clock_overlay_opacitystring100, 85, 70, 50 (%)Clock transparency
local:clock_overlay_show_dateboolfalseShow date under the clock
local:clock_overlay_wifiboolfalseShow Wi-Fi quality icon

Sleep Timer

KeyTypeValues / DefaultDescription
local:sleep_inactivity_timeoutstringoff, 2, 3, 4, 6 (hours). Default: 4Hours of inactivity before "Still watching?" prompt

20. Error Handling

All endpoints return JSON error responses with appropriate HTTP status codes:

StatusMeaningExample
400Bad request — missing or invalid parameters{"error":"Missing 'url' parameter", "usage":"..."}
401Unauthorized — missing or wrong API token{"error":"unauthorized", "hint":"..."}
403Forbidden — endpoint needs the full token{"error":"insufficient_token", "hint":"..."}
404Not found — resource doesn't exist{"error":"data_source 99 not found"}
429Too many attempts — brute-force protection{"error":"too_many_attempts", "retry_after":10}
500Internal error{"error":"..."}
503Player not ready — retry in a moment{"error":"Player not ready yet", "retry":true}
💡 Error Hints Many 400 responses include a usage field with the correct call format, and a valid_values or hint field to help you self-correct. Always check these before retrying.

Retry Strategy

BingeBop API Manual · Version 1.0 · August 2026
Online version: bingebop.com/guide/api.html
Generated from the live API surface. For the machine-readable version, call GET /api/describe.