Documented from the bambu-printer-manager project by Synman.
The local printer API is a REST interface exposed by self-hosted printer management tools (like bambu-printer-manager) that communicate with Bambu Lab printers over MQTT on the local network. This is not a Bambu Lab official API — it's a community-built management layer.
The management server connects to the printer's local MQTT broker (see mqtt.md) and exposes a REST API on a configurable local port.
Returns the complete serialized printer object with all current state.
Returns 304 Not Modified if no live data is available.
Health check endpoint. Returns 200 with printer JSON when healthy, 500 when no live data. Both include full printer state.
Sets the nozzle temperature for the active extruder.
| Parameter | Type | Required | Description |
|---|---|---|---|
temp |
int | yes | Target temperature in C (clamped to 0 minimum) |
For single-extruder printers sends M104 S{temp}. For H2D dual-extruder models sends M104 S{temp} T{active_tool}.
Sets the heated bed temperature.
| Parameter | Type | Required | Description |
|---|---|---|---|
temp |
int | yes | Target bed temperature in C |
Sets the chamber temperature. Uses SET_CHAMBER_TEMP_TARGET + SET_CHAMBER_AC_MODE (mode 0 for <40C, mode 1 for >=40C).
| Parameter | Type | Required | Description |
|---|---|---|---|
temp |
int | yes | Target chamber temperature in C |
Sets the part-cooling fan speed.
| Parameter | Type | Required | Description |
|---|---|---|---|
percent |
int | yes | Speed percentage (0-100) |
Sets the auxiliary fan speed.
| Parameter | Type | Required | Description |
|---|---|---|---|
percent |
int | yes | Speed percentage (0-100) |
Sets the exhaust/chamber fan speed.
| Parameter | Type | Required | Description |
|---|---|---|---|
percent |
int | yes | Speed percentage (0-100) |
Starts a 3MF print job.
| Parameter | Type | Required | Description |
|---|---|---|---|
filename |
string | yes | Full SD card path to the .3mf file |
platenum |
int | no | Plate index within the file (0-based, default: 0) |
plate |
string | yes | Plate type: AUTO, COOL_PLATE, ENG_PLATE, HOT_PLATE, TEXTURED_PLATE, NONE |
use_ams |
bool | no | "true" to enable AMS filament feeding |
ams_mapping |
string | no | JSON-encoded array of absolute tray IDs (0-103 for 4-slot AMS, 128-135 for single-slot HT, 254 for external spool, -1 for unmapped) |
bl |
bool | no | "true" to enable bed levelling |
flow |
bool | no | "true" to enable flow-rate calibration |
tl |
bool | no | "true" to enable timelapse recording |
Pauses the active print job.
Resumes a paused print job.
Cancels or stops the current print job.
Skips specified objects during an active print.
| Parameter | Type | Required | Description |
|---|---|---|---|
objects |
string | yes | Comma-separated list of identify_id values to skip |
Object IDs are obtained from get_3mf_props_for_file.
Loads filament from a specified AMS slot or external spool.
| Parameter | Type | Required | Description |
|---|---|---|---|
slot |
int | yes | AMS slot index (0-3) or 254 for external spool |
Unloads the currently loaded filament.
Re-reads the RFID tag for a specific AMS slot. Only RFID-equipped Bambu spools carry tag data.
| Parameter | Type | Required | Description |
|---|---|---|---|
slot_id |
int | yes | Slot position within the AMS unit (0-3) |
ams_id |
int | yes | AMS unit ID (typically 0-3) |
Sets custom filament details for an AMS tray. Sleeps 2 seconds after issuing the command.
| Parameter | Type | Required | Description |
|---|---|---|---|
tray_id |
int | yes | Global tray ID (0-15 for 4-slot AMS, 254/255 for external spools) |
tray_info_idx |
string | yes | Bambu filament preset index (e.g., GFL99) |
tray_id_name |
string | no | Display name for the spool |
tray_type |
string | no | Filament material type (e.g., PLA, PETG-CF) |
tray_color |
string | no | Spool colour as hex (e.g., #FF5733) |
nozzle_temp_min |
int | no | Minimum nozzle temp in C (-1 to leave unchanged) |
nozzle_temp_max |
int | no | Maximum nozzle temp in C (-1 to leave unchanged) |
Returns the cached SD card file tree. Alphabetically sorted with folders before files.
Refreshes the SD card listing from the printer via FTPS.
Returns SD card tree filtered to .3mf files only.
Refreshes both the full and 3MF-only SD card caches via FTPS.
Deletes a file or folder from the SD card.
| Parameter | Type | Required | Description |
|---|---|---|---|
file |
string | yes | SD card path. Trailing slash for folders (recursive delete) |
Creates a new directory on the SD card.
| Parameter | Type | Required | Description |
|---|---|---|---|
dir |
string | yes | Full path for the new directory |
Renames or moves a file/folder on the SD card.
| Parameter | Type | Required | Description |
|---|---|---|---|
src |
string | yes | Source path |
dest |
string | yes | Destination path |
Uploads a file to the management server's ./uploads/ directory.
Form data: myFile (file)
Transfers a file from the server's uploads directory to the printer SD card via FTPS.
| Parameter | Type | Required | Description |
|---|---|---|---|
src |
string | yes | Filename in ./uploads/ (basename only) |
dest |
string | yes | Full destination path on SD card |
Downloads a file from the printer SD card.
| Parameter | Type | Required | Description |
|---|---|---|---|
src |
string | yes | Full path on the SD card |
Parses and returns metadata for a .3mf file.
| Parameter | Type | Required | Description |
|---|---|---|---|
file |
string | yes | Full SD card path to the .3mf file |
plate |
int | no | Plate number (1-based, default: 1) |
Returns metadata for the currently active print job.
Switches between right (0) and left (1) extruders.
Sets nozzle diameter and material type for the active extruder.
| Parameter | Type | Required | Description |
|---|---|---|---|
nozzle_diameter |
float | yes | Diameter in mm: 0.2, 0.4, 0.6, 0.8 |
nozzle_type |
string | yes | Material: STAINLESS_STEEL, HARDENED_STEEL, TUNGSTEN_CARBIDE, BRASS, E3D |
Requests the printer push current nozzle info in its next status message.
| Parameter | Type | Required | Description |
|---|---|---|---|
enabled |
bool | yes | "true" enables, anything else disables |
| Parameter | Type | Required | Description |
|---|---|---|---|
enabled |
bool | yes | "true" enables, anything else disables |
sensitivity |
string | no | "low", "medium" (default), "high" |
| Parameter | Type | Required | Description |
|---|---|---|---|
enabled |
bool | yes | "true" enables, anything else disables |
sensitivity |
string | no | "low", "medium" (default), "high" |
| Parameter | Type | Required | Description |
|---|---|---|---|
enabled |
bool | yes | "true" enables, anything else disables |
sensitivity |
string | no | "low", "medium" (default), "high" |
| Parameter | Type | Required | Description |
|---|---|---|---|
enabled |
bool | yes | "true" enables, anything else disables |
sensitivity |
string | no | "low", "medium" (default), "high" |
| Parameter | Type | Required | Description |
|---|---|---|---|
cmd |
string | yes | PAUSE, RESUME, or RESET |
| Parameter | Type | Required | Description |
|---|---|---|---|
setting |
string | yes | CALIBRATE_REMAIN_FLAG, STARTUP_READ_OPTION, or TRAY_READ_OPTION |
enabled |
bool | yes | "true" enables, anything else disables |
Sends raw G-code commands to the printer. Use | to separate multiple commands (converted to newlines).
| Parameter | Type | Required | Description |
| --------- | ------ | -------- | ---------------- | --------------- |
| gcode | string | yes | G-code string (| for newlines) |
Warning: Direct G-code bypasses safety interlocks.
| Parameter | Type | Required | Description |
|---|---|---|---|
option |
string | yes | AUTO_RECOVERY, FILAMENT_TANGLE_DETECT, SOUND_ENABLE, AUTO_SWITCH_FILAMENT, NOZZLE_BLOB_DETECT, AIR_PRINT_DETECT |
enabled |
bool | yes | "true" enables, anything else disables |
Controls chamber and column LED lights.
| Parameter | Type | Required | Description |
|---|---|---|---|
state |
string | yes | "on" turns on, anything else turns off |
Sets the print speed profile.
| Parameter | Type | Required | Description |
|---|---|---|---|
level |
string | yes | "1" (silent), "2" (standard), "3" (sport), "4" (ludicrous) |
Returns full telemetry history combined with current printer state.
Zooms in on a telemetry chart (reduces visible window by 500s, minimum 500s).
| Parameter | Type | Required | Description |
|---|---|---|---|
name |
string | yes | Collection: tool, bed, chamber, fan, aux_fan, exhaust_fan, heatbreak_fan, tool_0, tool_1 |
Zooms out on a telemetry chart (increases visible window by 500s).
| Parameter | Type | Required | Description |
|---|---|---|---|
name |
string | yes | Same collection names as zoom_in |
Dumps all internal data collections as JSONL (newline-delimited JSON).
Pauses or resumes the MQTT connection.
Forces printer reconnection. If disconnected: quit() + start_session(). If connected: refresh().
Toggles root logger between DEBUG and INFO.
| Parameter | Type | Required | Description |
|---|---|---|---|
verbose |
bool | no | "true" for verbose, default "false" |
Returns contents of ./output.log.
Clears the log file.
Test endpoint that raises ZeroDivisionError to test error handling.
Returns the generated OpenAPI 3.0 schema.
Serves Swagger UI for interactive API exploration.