Skip to content

Files and HTTP interface ​

This page is for advanced users integrating another control surface or inspecting saved settings. Use the WebUI guides for normal operation. The interface is an evolving firmware API, not a versioned general-purpose remote-control standard.

Trusted local control only

These HTTP operations control the device and can modify files, restore settings, or reboot it. The current server does not provide a user-account/authentication workflow or HTTPS, and binds only to the configured USB/NCM address. Do not expose it directly to the internet or an untrusted network. Do not issue write requests casually against a working performance setup. Unknown Host values are rejected to prevent DNS-rebinding access.

Persistent device files ​

Paths below are on the AudioX data partition, normally mounted at /audiox. They are not paths on the computer running your browser.

PathContents
config/config.txtActive USB configuration and persistent view/playback preferences
config/config.staging.txtStaged configuration saved before USB reload
config/routing.txtSaved signal connections and routing-helper configuration
config/midi_map.txtSound/action/CC mappings, sampler, lighting, effects, and sound order
config/scripts.txtNamed script definitions, trigger bindings, and permissions
config/scripts/Script-owned persistent options and custom files
config/scenes/Named setup scenes
config/fx_params.txtSaved effect parameter data used by the firmware
config/volumes.txtSaved gains keyed by audio thing ID
config/bluetooth/paired.txtSaved Bluetooth pairing records, Auto-connect flags, and sensitive key material
sfx/Soundboard audio files
plugins/Installed native .axm modules, metadata, and sandboxed UI assets; excluded from normal backups
config/telemetry-consent-v3.txtDevice-local opt-in decision (0 or 1) for linkable reports and public daily aggregates; excluded from backups
config/telemetry-queue-v3.txtBounded pending 10-second usage reports with public-sharing consent; excluded from backups
config/telemetry-installation-id.txtRandom 256-bit installation ID; deleted on opt-out; excluded from backups

Use the normal editors instead of hand-editing files where possible: edits can need validation, runtime reload, and corresponding LED/graph refresh. Backups include the supported settings and sound roots, not arbitrary files placed on the data partition. See Config and backups.

Do not confuse /audiox/config/config.txt with /boot/config.txt. The latter controls Raspberry Pi boot behavior, kernel selection, and overlays. Changing boot files can make the device unbootable.

Request conventions ​

Optional telemetry ​

See Optional telemetry for the privacy scope and user controls, and Telemetry collector setup for deployment details.

EndpointPurpose
GET /api/telemetryConsent (unknown, disabled, enabled), consent version, pending count, capacity, interval, batch size and error
POST /api/telemetryExact text enabled=0 or enabled=1&consent_version=3; opting out clears queued points and installation ID
GET /api/telemetry/batchNext 1-1,000 points, or {} when empty/disabled; non-2xx on a queue error. Browser upload cycles start at 100 pending points
POST /api/telemetry/ackExact 65-character batch token from a successfully uploaded batch; rejects stale tokens

These are local device endpoints. No GET request causes a cloud upload. The browser relays ready batches only after opt-in. Consent is not copied in configuration backups.

For plugin upload, catalog, reload/removal, and UI asset routes, see Native plugin HTTP management.

Base URLs in this page are relative to the device, such as http://audiox.local/api/system/info.

  • Read endpoints commonly return JSON or plain text; check Content-Type.
  • Mutation endpoints commonly accept plain key=value&key=value text, not JSON. Conventions differ by endpoint; copy the current WebUI's request shape when implementing an advanced client.
  • Browser write requests with a cross-origin Origin or Sec-Fetch-Site: cross-site are rejected. This is CSRF protection, not authentication.
  • Treat non-2xx status codes as failures and read the accompanying text.
  • A queued trigger response is not a completion receipt.
  • Use the WebSocket pub/sub interface for live status where available; otherwise poll small status endpoints at sensible intervals instead of repeatedly downloading files or rebuilding state.
  • Use exact IDs from the device. Friendly names are not stable identifiers.

Live status events ​

Connect to ws://audiox.local/ws and negotiate the audiox.v1 subprotocol. Send a JSON text message to subscribe:

json
{"type":"subscribe","topics":["audio.meters","midi.note"]}

Send {"type":"unsubscribe","topics":["audio.meters"]} to stop receiving a topic. Server messages have the form {"type":"event","topic":"midi.note","data":{...}}. Supported topics are:

TopicDataSnapshot interval
audio.metersCurrent audio meter values50 ms
midi.noteMIDI connection and latest note/sequence/channel50 ms
midi.ccMIDI connection and latest CC/sequence/value50 ms
system.infoSame device information as GET /api/system/info1 s
routing.thingsSame routing topology as GET /api/routing/things1 s
desktop.statusConnected desktop and its latest hello, or {"connected":false}On change

Events are snapshots, not a durable event log; reconnecting clients should resubscribe and use HTTP endpoints for on-demand data.

The native desktop companion uses the separate ws://audiox.local/ws/desktop endpoint with subprotocol audiox.desktop.v1. It sends a bounded text hello, for example:

json
{"type":"hello","hostname":"workstation","os":"linux","capabilities":["pipewire","route_stream"]}

Only one desktop is accepted. A changed hello replaces its current snapshot; disconnecting publishes {"connected":false}. A connected desktop.status snapshot has connected: true, a connection session number, and a hello object. Capability strings describe detected host support; not all capabilities have AudioX controls. The desktop endpoint rejects browser Origin/Fetch-Site headers but does not authenticate native peers; keep the USB network trusted and private.

The server advertises the extension with media_status: true in its ready message. Only after receiving that message, Linux companions with playerctl advertise mpris and include an optional media field in their hello. Its values are playing, paused, stopped, none, or error; playing takes precedence when multiple players exist. Older companions omit the field. Playback status is read-only.

POST /api/desktop/route accepts stream=<id>&sink=<id>&session=<session> and returns a route request ID. GET /api/desktop/route?id=<id> reports pending, succeeded, failed, disconnected, or timed_out; only the most recent result is retained. The session must match the current connected desktop, preventing a delayed request from routing a replacement host.

POST /api/desktop/update accepts tag=<release-tag> and queues installation on the currently connected companion advertising desktop_update. Poll GET /api/desktop/update?id=<id> for pending, succeeded, failed, disconnected, or timed_out. Only the latest result is retained. The Linux companion resolves the exact published release and verifies its AppImage checksum. A successful result means the image was selected; check companion logs if its restart fails. This endpoint does not update the Pi.

POST /api/desktop/inventory accepts session=<session> and returns a request ID when a Linux companion advertises pipewire_nodes. Poll GET /api/desktop/inventory?id=<id> for pending, succeeded, failed, disconnected, or timed_out. A successful result contains nodes, an array of PipeWire node IDs and available node.name, node.description, node.nick, application.name, application.id, media.class, and object.serial properties. The inventory is a bounded snapshot and may become stale as the desktop changes; only the most recent request is retained. It is cleared when the companion disconnects or loses the capability. object.serial is a decimal string to preserve 64-bit values.

For example, these read-only requests inspect the running device:

sh
curl --fail http://audiox.local/api/system/info
curl --fail http://audiox.local/api/routing/things
curl --fail http://audiox.local/api/audio/volumes
curl --fail http://audiox.local/api/effects
curl --fail http://audiox.local/api/macros

Replace the hostname with your numeric device address if name resolution is unavailable. The commands require access to your device, not this docs site.

Audio, routing, and effects ​

EndpointPurpose
GET /api/audio/devicesDetected audio device information
POST /api/audio/rescanRequest device rescan
GET /api/routing/thingsRouting nodes, channels, IDs, and current graph information
POST /api/routing/reloadRebuild runtime routing from saved configuration
POST /api/routing/helper/create or /deleteCreate/remove the routing helper
GET /api/audio/volumesAudio thing IDs/names and current gains
POST /api/audio/volume/setSet and save a gain using id and gain
GET /api/effectsExisting effects, display name, saved custom_name, parameter metadata, and MIDI assignments
POST /api/effect/create, /set, /deleteManage an effect or its parameters
POST /api/effect/nameSave id and name_hex (UTF-8 encoded as hex, up to 63 decoded bytes); empty name restores automatic naming
POST /api/effect/midi_cc/set, /deleteEffect parameter CC mapping
POST /api/effect/midi_toggle/set, /deleteEffect bypass-note mapping
POST /api/effect/midi_light/set, /deleteEffect enabled/bypassed lighting

HTTP volume changes use gain, with a 0.0-2.0 API/runtime range; the WebUI slider and MIDI CC both span 0-200%, with 100% at unity and 200% at 2x gain. Lua's volume.set uses percent, restricted to 0-100. Do not send a percentage as an HTTP gain or assume a Lua parameter is normalized.

See Routing for connection syntax and graph limitations, and Effects for the actual parameter units.

Soundboard and MIDI ​

EndpointPurpose
GET /api/soundboard/orderComplete ordered WAV filename list, one per line
POST /api/soundboard/orderSave a complete newline-separated order; stale lists can return 409
GET /api/soundboard/layoutRead list/grid mode, dimensions, learned MIDI corners, and cell assignments
POST /api/soundboard/layoutSet mode, rows/columns, a corner/note, or an sfx/row/column assignment (occupied cells swap); use action=stop_all or action=sampler_toggle instead of sfx for action tiles. unassign=1 clears the element's cell and MIDI bindings
GET /api/midi/sampler_modeRead runtime sample-selection mode (active)
POST /api/midi/sampler_modeToggle runtime sample-selection mode, also used by the sampler grid tile
GET /api/midi/passthrough_only, POST /api/midi/passthrough_onlyRead/toggle temporary passthrough-only mode (active); enabling requires USB MIDI passthrough configured
POST /api/soundboard/trigger/<target>Start a one-shot sound
POST /api/soundboard/press/<target>Start the shared held voice
POST /api/soundboard/release/<target>Release the held voice
POST /api/soundboard/stop_allStop soundboard playback
POST /api/soundboard/reloadReload clips and clean up missing-file mappings
GET /api/soundboard/modes, POST /api/soundboard/mode/setInspect/set per-sound playback mode
GET /api/midi/last_note, /api/midi/last_ccLatest input values, sequence counters, and connection status for learning
GET /api/midi/mappings, POST /api/midi/mapping/set, /deleteSound note bindings
GET /api/midi/actions, POST /api/midi/action/set, /deletestop_all, sampler_toggle, and passthrough_toggle note mappings
GET / POST /api/midi/sampler_configSampler keyboard enable, channel, and root note
GET / POST /api/midi/light_configGlobal LED output channel and state velocities
GET /api/midi/light_sounds, POST /api/midi/light_sound/set, /deletePer-sound light overrides
POST /api/midi/light_refreshResend current LEDs
GET / POST /api/midi/light_dimInspect/change temporary dim state
GET /api/midi/cc_volumes, POST /api/midi/cc_volume/set, /deleteVolume CC assignments
GET / POST /api/framebuffer/viewPersistent meters/soundboard display choice

passthrough_toggle requires channel=0-15 alongside note and action when setting a binding; action listings include its channel. Other global actions remain note-only. Saved passthrough bindings without a channel use channel 0.

Soundboard trigger targets use the server's target encoding; the current WebUI encodes its filename using encodeURIComponent before appending it to the path. Keep filenames simple, and do not assume arbitrary filesystem paths are valid trigger targets.

Per-sound lighting mutation fields are sfx, mapped_vel, and playing_vel. Inspect the current API behavior before depending on clearing individual overrides. The WebUI currently exposes global lighting and effect/script lighting, not a per-sound lighting form.

Named scripts ​

RequestPurpose
GET /api/scriptsReturn { "scripts": [...] } including IDs and runtime errors
POST /api/scriptsCreate or update a saved callback script
DELETE /api/scriptsRemove by id
POST /api/scripts/runQueue the saved script's run hook using id
POST /api/scripts/controlPersist a declared option or queue a declared button

A create/update body contains:

text
id=<existing ID, omitted for create>
name_hex=<UTF-8 name encoded as hex>
midi_enabled=0 or 1
channel=0..15
note=0..127
script_hex=<UTF-8 callback source encoded as hex, up to 17,408 decoded bytes>
config_write_ack=0 or 1
idle_velocity=0..127
pressed_velocity=0..127

Fields can be newline-separated or joined with &. Names and script source are hex to keep punctuation and UTF-8 separate from field separators. Delete/Run use id=<positive integer>.

The list includes plain name, boolean midi_enabled, derived event_mask, hook_mode: true, saved config_write_allowed, and hex-encoded script_hex / runtime_error_hex. The ui array describes native controls: key, label, type (boolean, number, string, button), typed value, and optional numeric min/max. ui_error_hex reports per-script schema/storage failures without preventing source editing. Decode error text as text, not HTML. Saving inspects unconditional top-level hook() registrations without running handlers. Run is rejected without a run hook. Device-management/configuration permission requires explicit acknowledgment. /api/macros and /api/midi/chords remain available for compatibility. /api/macros retains its macros response property.

Control requests use id=<positive integer>&key_hex=<UTF-8 key as hex>. Options also require value_hex=<hex-encoded scalar text>: true/false, a finite decimal number, or UTF-8 string according to the declared type. Buttons omit value_hex. Unknown keys, invalid values, unavailable scripts, and full trigger queues are errors. Options persist before queuing config_change; buttons queue ui. Responses acknowledge saving/queuing, not callback completion. Script-owned options need no official-device write permission.

Saving syntax-valid Lua does not guarantee every branch will execute successfully. Device requirements and actual effect/volume targets are checked at runtime; see Scripts and the Lua reference.

Bluetooth, configuration, and system ​

EndpointPurpose
GET /api/bluetooth/devicesSaved/nearby Bluetooth devices and current status
POST /api/bluetooth/scan, /pair, /connect, /disconnect, /unpair, /auto-connectBluetooth lifecycle and per-device Auto-connect operations
POST /api/config/reloadApply staged USB configuration
GET /api/config/backupStream a complete .axb backup
PUT /api/config/restoreUpload/validate/stage an .axb, then reboot
GET /api/system/info, /api/versionDevice/build information
GET /api/system/logsBounded, filtered log query
POST /api/system/sync, /restart, /shutdownSystem lifecycle actions
GET / DELETE /api/system/boot-failureRead/dismiss saved failed-boot report
PUT /api/updateInstall a board-matching .axu firmware archive

/api/rootfs/<path> reads/writes/deletes supported files under the data root; it is not a general shell or access to the entire live root filesystem. Sound uploads convert to 48 kHz stereo WAV in the background. The original clip stays in place if conversion fails or times out. A successful response means the converted file has replaced it and the soundboard has reloaded. Only one large upload or sound import is accepted at a time; retry a 503 Service Unavailable response once the current transfer has finished.

HTTP transfers and WebSocket frames are handled separately from the control loop. A slow client does not hold up the loop; applying firmware, restoring settings, and other device operations can still take time.

Low-level boot/kernel/runtime upload endpoints also exist for development. They are not the recommended update path. Use the validated .axu workflow described in System, and the development guide when working on boot components.

Firmware archive format ​

AXU is a little-endian binary archive, not a ZIP file. Its header contains eight-byte AXUPDATE magic, a u32 format version (2), and a u32 entry count (1-64). Each entry has a u32 type, u32 CRC32, u64 payload size, then the payload bytes. Entries may be ordered independently, and no bytes may follow the final entry. Types 1-5 are required exactly once in a v2 archive; type 6 is optional and may appear at most once.

TypePayload
1Boot config.txt
2Bootloader initramfs.cpio.gz
3Kernel image
4Runtime program.cpio.gz
5key=value metadata
6Optional single-line cmdline.txt, containing rdinit=/init

Metadata requires board (pi4 or pi5) and kernel (a boot filename matching kernel*.img). Optional version and kernel_version identify the build. The board must match the device, and the boot config's kernel= must name the archive kernel. Uploads are limited to 256 MiB.

For format extensions, add entry types or metadata keys rather than changing existing meanings. Unknown metadata keys are ignored. Unknown entry types are CRC-checked and skipped unless bit 31 is set, which requires the reader to understand that entry. Missing optional entries leave the existing file intact. A header-version bump is for changes that cannot be expressed compatibly.

The reader also accepts the four-entry v1 format without metadata and installs its kernel as kernel8.img.

AudioX is open source and under active development.