API Reference¶
Bambuddy provides a REST API for integration with external tools and automation.
Authentication¶
API Key Authentication¶
Include your API key in the X-API-Key header:
Getting an API Key¶
- Go to Settings > API Keys
- Click Create API Key
- Select permissions
- Copy the key (shown only once)
See API Keys & Webhooks for details.
Media Token¶
Thumbnails, plate previews, timelapses, print photos, QR codes, cover images and link icons are loaded by the browser as <img> and <video> sources, which cannot carry an Authorization header. Those routes therefore also accept a token in the query string:
curl -X POST -H "Authorization: Bearer <jwt>" \
http://localhost:8000/api/v1/auth/media-token
# => {"token": "..."}
curl "http://localhost:8000/api/v1/archives/42/thumbnail?token=..."
Any signed-in user can mint one; it is valid for 60 minutes and is not consumed, so one token serves every image on a page. It is authentication, not authorisation — each route still applies the permission and ownership rules of the resource it serves, so a media token reaches exactly the images its holder could already see listed.
Scripts and integrations do not need one
The media routes accept X-API-Key and Authorization: Bearer directly. The query token exists only for browser element loads.
Not the camera stream token
A camera_stream, camwall or overlay token is refused on these routes, and a media token is refused on the camera routes. Before Bambuddy 1.2.6 the media routes took the camera stream token, which made camera:view a prerequisite for seeing any image in the app; see Long-Lived Camera Tokens for what the camera scopes do reach.
Interactive API Browser¶
Bambuddy includes a built-in API browser for exploring and testing endpoints without external tools.
Accessing the API Browser¶
- Go to Settings > API Keys
- The API Browser appears in the right column
Features¶
| Feature | Description |
|---|---|
| OpenAPI Integration | Automatically loads all endpoints from the schema |
| Grouped by Category | Endpoints organized by printers, archives, settings, etc. |
| Parameter Inputs | Fill in path, query, and body parameters |
| Auto-examples | Request body pre-filled with schema examples |
| Live Execution | Execute requests and see real responses |
| Response Display | Formatted JSON with status code and timing |
| Search | Filter endpoints across all categories |
Testing with API Keys¶
- Paste your API key in the "API Key for Testing" input
- The key is sent as
X-API-Keyheader with each request - Test authenticated endpoints without external tools
Quick Setup
After creating a new API key, click "Use in API Browser" to automatically add it for testing.
Base URL¶
All endpoints are relative to this base URL.
Printers¶
List Printers¶
Response:
[
{
"id": 1,
"name": "Workshop X1C",
"ip_address": "192.168.1.100",
"serial_number": "01P00A000000001",
"model": "X1C",
"location": null,
"is_active": true
}
]
Get Printer¶
Response:
{
"id": 1,
"name": "Workshop X1C",
"ip_address": "192.168.1.100",
"serial_number": "01P00A000000001",
"model": "X1C",
"location": null,
"is_active": true
}
Live state (print progress, temperatures, AMS) comes from GET /printers/{id}/status.
Get Printer Status¶
Response:
{
"id": 1,
"name": "X1C-Lab",
"connected": true,
"state": "RUNNING",
"progress": 45,
"remaining_time": 3600,
"layer_num": 120,
"total_layers": 267,
"current_archive_id": 42,
"current_plate_id": 1,
"temperatures": {
"nozzle": 220,
"nozzle_target": 220,
"bed": 60,
"bed_target": 60,
"chamber": 35
},
"hms_errors": [
{
"code": "0x8004",
"attr": 50364420,
"module": 3,
"severity": 2,
"actions": [],
"job_id": "1234567890",
"full_code": "03008004",
"description": "Filament ran out. Please load new filament."
}
],
"awaiting_plate_clear": false
}
layer_num is the current layer; total_layers is the layer count of the running job. temperatures carries a _target companion for the heaters that have one, and omits chamber entirely on models without a chamber sensor. state is the firmware's own value (IDLE, PREPARE, SLICING, RUNNING, PAUSE, FINISH, FAILED), not a lowercased Bambuddy label.
current_archive_id is the archive of the running print while state is RUNNING or PAUSE, and null otherwise. Use it to tie a running print to its archive, for prints sent from the cloud and over LAN alike, rather than matching by file name or time, which can pick an earlier run of the same file. One case is matched by name: after a Bambuddy restart mid-print, a print that reports no job id (sent from Bambu Studio over LAN, Handy or the printer's screen) is linked to the printing archive of that name. It stays null until the archive exists, which can take a minute while Bambuddy downloads the 3MF from the printer at the start, for a print Bambuddy does not archive (Auto-archive off), and once the archive has been deleted. current_plate_id is the plate of the 3MF being printed, with the same RUNNING/PAUSE rule: the plate Bambuddy sent when it started the print, otherwise the one in the G-code path the printer reports.
full_code identifies the fault: 16 hex characters for a fault from the printer's hms[] array (the four groups the printer screen shows), 8 for a print_error.
severity is Bambu's alert level: 1 error (the print was stopped), 2 warning (the print is paused), 3 notice (the print carries on), 0 when the printer set no valid level. For an hms[] fault it is the level the printer sends; a print_error carries no level, so it is taken from the first digit of the error number (4xxx → 1, 8xxx → 2, Cxxx → 3).
description is the text Bambu publishes for the fault on this printer model, taken from Bambu Studio's HMS files, so a client does not have to carry its own copy of the catalogue. It is English only and is not localized. It is null when Bambu publishes no text for the code. Treat null as "no text available", never as "no fault": the fault is fully reported either way, and full_code is what identifies it. Bambuddy's own UI counts a fault when it offers actions, or when it has a description and isn't an hms[] notice (severity 3 with a 16-character full_code). The same fields are on the printer_status WebSocket message.
awaiting_plate_clear is a Bambuddy-side gate, not printer telemetry. It goes true when a print reaches a terminal state and stays true until the plate is confirmed clear via Clear Plate; the queue will not dispatch the next job in the meantime. It survives restarts and Auto Off power cycles, so a printer that reports IDLE after a reboot can still be waiting. The same flag is pushed over the WebSocket printer_status message and over MQTT — including a dedicated retained topic, which is the better subscription for automations because it does not depend on the printer still being powered on.
Refresh Printer Status¶
Request a full status update from the printer via MQTT pushall command. Useful for getting fresh AMS data after swapping spools.
Response:
Errors:
404- Printer not found400- Printer not connected
Clear HMS Errors¶
Clear HMS/print errors on the printer. Sends a clean_print_error MQTT command and clears errors locally.
Response:
Errors:
404- Printer not found400- Printer not connected500- Failed to clear HMS errors
Permission: printers:control
Clear Plate¶
Acknowledge that the build plate has been cleared after a finished/failed print. Sets a plate-cleared flag so the scheduler can start the next queued print.
Response:
Acknowledgement is accepted whenever awaiting_plate_clear is true, whatever the printer currently reports — after an Auto Off power cycle it boots into IDLE with no memory of the finished print, and the gate still needs clearing. The reported state only matters as a fallback when the flag is not set.
The printer does not have to be online. Clearing the plate only mutates Bambuddy-side state — no command is sent to the printer — so it works on a machine Auto Power Off has switched off, which with that feature enabled is the normal end-of-print situation. The queue still waits for the printer to come back before dispatching; releasing the gate is what allows it to power the printer on again.
Errors:
404- Printer not found400- Printer is not awaiting acknowledgement and is not inFINISH/FAILEDstate
Permission: printers:clear_plate
Set Print Speed¶
Change the print speed preset during an active print.
Query Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
mode | int | Yes | Speed preset: 1 (Silent 50%), 2 (Standard 100%), 3 (Sport 124%), 4 (Ludicrous 166%) |
Response:
Errors:
404- Printer not found400- Printer not connected422- Invalid mode (must be 1-4)500- The printer could not be sent the command (its connection is down)
Permission: printers:control
Add Printer¶
Request:
{
"name": "New Printer",
"ip_address": "192.168.1.101",
"access_code": "12345678",
"serial_number": "01P00A000000002"
}
Update Printer¶
Request:
Delete Printer¶
?delete_archives=false keeps the printer's archives. What is limited to the printer is deleted with it: notification providers and smart plugs assigned to it, and virtual printers that send to it. API keys limited to it lose it; a key whose last printer goes reaches none.
Download Multiple Printer Files¶
API clients can request a disk-backed ZIP containing files from printer storage:
POST /printers/{id}/files/download-zip
Content-Type: application/json
{
"paths": [
"/timelapse/video.mp4",
"/ipcam/ipcam-record.20260812.mp4"
],
"sizes": {
"/timelapse/video.mp4": 773468,
"/ipcam/ipcam-record.20260812.mp4": 250000000
}
}
The response is a ZIP attachment. sizes is an optional map of FTP-reported byte sizes. Supplying it lets Bambuddy reject an oversized selection or insufficient free space before FTP transfer begins; existing clients that send only paths, relative paths, or duplicate paths remain supported, and actual downloaded bytes are always capped. Up to 1,000 paths and 10 GiB total can be requested. Files that cannot be downloaded are skipped; response headers report requested, downloaded, and failed counts, and an all-failed request preserves the historical empty-ZIP response.
sizes is all-or-nothing: send it for every path or omit it entirely. A map covering only some of the selection is rejected, as is a negative size, and the keys must match the paths strings exactly — if paths are relative, the sizes keys have to be relative too.
| Status | Meaning |
|---|---|
400 | Empty selection |
413 | Selection exceeds 1,000 paths or 10 GiB |
422 | sizes does not cover exactly the selected paths, or a size is negative |
504 | The 30-minute preparation deadline passed |
507 | The app data volume cannot safely stage the selection |
Permission: printers:files
The web UI uses an asynchronous browser-native variant so neither large source files nor the result have to be buffered into a JavaScript Blob, and the initiating HTTP request does not occupy a proxy connection for the whole FTP transfer:
POST /printers/{id}/files/download-jobwith normal authentication andpaths,sizes,filename, andas_zip. The endpoint returns the job immediately. It validates more strictly thandownload-zipdoes: duplicate paths are rejected with400, andas_zip: falserequires exactly one path, because a native download has no container to put a second file in.- Poll
GET /printers/{id}/files/download-jobs/{job_id}. The body carriesjob_id,printer_id,state,requested,successful,failed,token,filename, andmessage, wherestateis one ofqueued,preparing,ready,failed, orcancelled.DELETEthe same URL to cancel; the FTP worker cooperatively stops and removes partial staging. - When
stateisready, the body'stokenfills in the nativeGET /printers/{id}/files/dl/{token}/{filename}URL. The token is short-lived, single-use, and bound to the printer ID. A spent or expired token answers403with a short text file rather than JSON, because the browser reaches this URL through a download click and saves whatever comes back.
All job and polling endpoints require printers:files, including the API key's optional printer_ids allowlist. Only the final /dl/ URL bypasses the gateway middleware, and it validates its resource-bound token itself. Staging lives under the configured archive data volume and is eligible for cleanup after one hour; cleanup runs at startup, before preparation, and every 15 minutes. Job state and cancellation are published as files, so any app worker can report on or cancel a job that another one is running. Preparations do not wait on each other: free space is re-checked against the bytes actually written throughout every transfer, so two jobs that start together each stop on their own when the volume runs low.
Archives¶
Archives and their prints¶
An archive is a file. Each print of it is a run with its own printer, plate, start and end, status and failure reason, outcome verdict, filament, cost, energy, timelapse and finish photos. Plates of one file, reprints, and the same file printing on several printers at once are all runs of one archive.
GET /archives/{id}/runslists an archive's runs, newest first. Each carries its ownnotes,photos(served byGET /archives/{id}/photos/{filename}) andtimelapse_path.photosis a list for a run that keeps its own (empty when it has none), and null for a run logged before runs kept their own photos: its photos are among the archive's.estimate_secondsandestimate_gramsare the slicer's estimate for the plate it printed. They are null for a run of a multi-plate file whose plate is not known, and for every run of an archive printed more than once whose plates are not known (a plain G-code file, or the 3MF missing).GET /archives/{id}/runs/{run_id}/timelapsestreams one run's timelapse video (media token, as the archive's own timelapse route): plates of one file each keep their own.404for a run of another archive, without a video, or on a printer outside your access.PATCH /print-log/{run_id}withnotessets one run's own note.GET /archives/prints?date_from=&date_to=lists the runs that ended between two days (tz,printer_id,limitup to 1000,offset), of the archives you see as in the archive list, in id order: the archives calendar.GET /print-loganswersdeleted_archive_ids: archives of its runs that were deleted.GET /archives/{id}?run_id=<run>returns the archive as that run printed it: the run's printer, status, times, plate, verdict, video and photos.PATCH /archives/{id}withrun_idsets one finished run's outcome: onlyuser_verdict(with itsuser_verdict_source),statusandfailure_reason(400for other fields;404for a run that is not the archive's, is still printing, or is on a printer outside your access).latest_run_idon an archive is its latest run by start, a print running now included: the one its per-print fields show.
Deprecated fields. On an archive, status, started_at, completed_at, failure_reason, user_verdict, user_verdict_source, user_verdict_at, printer_id, plate_id, timelapse_path, actual_time_seconds, time_estimate_seconds (the estimate for the plate it printed, which time_accuracy compares with; print_time_seconds adds every plate up) and time_accuracy describe its latest run, energy_kwh, energy_cost and wear_cost its first, and photos holds every run's finish photos together with the ones uploaded by hand. They are flagged deprecated in the OpenAPI schema and stay for one more release. Read them from the runs instead.
Printer access. A user limited to some printers sees an archive when it, or any of its runs, is on one of their printers, and then only their runs of it. When the archive's latest run is on a printer outside their access, the per-print fields show their own latest run instead. On an archive that also printed on printers outside their access, energy_kwh, energy_cost and wear_cost are those of the run shown to them, and the time-accuracy fields are empty. The run list and counts include only their runs, and the video and finish photos of prints on other printers are left out (404 on their routes). Changes to the whole archive (delete, its video, its source, F3D and project page, and in PATCH anything but notes, tags, is_favorite, project_id or a run_id outcome) answer 403 while it also printed on printers outside their access.
List Archives¶
Query Parameters:
| Parameter | Type | Description |
|---|---|---|
printer_id | int | Archives with any run on this printer (none for a printer outside your access); their run counts are of the runs on it. GET /archives/search takes it the same way |
project_id | int | Filter by project |
date_from | date | From this day (YYYY-MM-DD) |
date_to | date | To this day, inclusive (YYYY-MM-DD) |
tz | string | IANA time zone the dates are calendar days in (e.g. Europe/Berlin); Bambuddy's own TZ when omitted or not a zone |
limit | int | Max results (default: 50) |
offset | int | Pagination offset |
For text search use GET /archives/search?q=... (at least 2 characters; also takes printer_id, project_id, status, limit and offset).
Response: a list of archives, newest first.
[
{
"id": 1,
"print_name": "Benchy",
"filename": "benchy.3mf",
"printer_id": 1,
"status": "completed",
"created_at": "2024-01-15T14:30:00",
"started_at": "2024-01-15T12:15:00",
"completed_at": "2024-01-15T14:30:00",
"print_time_seconds": 8100,
"filament_used_grams": 45.2,
"filament_type": "PLA"
}
]
status is one of completed, failed, aborted, cancelled or printing.
started_at is when the print started, as Bambuddy saw it start, not when the archive was written: that waits for the 3MF download. created_at is when the archive was written. started_at and completed_at belong to the latest run (latest_run_id); each run has its own.
Get Archive¶
The id of an archive merged into another (see Merge Duplicate Archives) returns the archive it went into.
Find Archive Videos¶
Returns an attached timelapse, matching printer-side timelapse, and IP-camera chunks whose timestamps overlap the print window. Directory inspection is read-only; no printer file is downloaded until a separate download request is made. Callers without printers:files still receive an attached local timelapse, plus a printer_files_forbidden warning, while printer discovery is skipped.
A printer-side timelapse is only looked for when nothing is attached to the archive yet, so local_timelapse and a "kind": "timelapse" entry in remote_files do not appear together. When a copy is attached, local_timelapse is {"name": ..., "size": ...}; otherwise it is null.
{
"archive_id": 42,
"printer_id": 1,
"local_timelapse": null,
"remote_files": [
{
"name": "video_2026-08-12_14-38-46.mp4",
"path": "/timelapse/video_2026-08-12_14-38-46.mp4",
"size": 773468,
"mtime": "2026-08-12T14:40:12",
"kind": "timelapse"
}
],
"warnings": []
}
warnings distinguishes the reasons a listing came back short, so a caller can tell an unreachable printer from one that simply has no footage:
| Warning | Meaning |
|---|---|
printer_files_forbidden | The caller lacks printers:files, so only the attached copy was considered |
printer_missing | The archive names a printer that no longer exists |
timelapse_unavailable | No timelapse directory could be read — the printer is off, unreachable, or in the FTPS handshake cool-off |
ipcam_unavailable | /ipcam could not be read, for the same set of reasons |
An archive with no printer or no recorded start time returns empty lists and no warning, because there is nothing to look for rather than something that failed.
Permissions: archives:read_all or ownership through archives:read_own; printers:files is additionally required for the printer-side portion of the response
Download an Attached Timelapse¶
Mints a single-use token bound to this archive's attached timelapse and returns it with the file's name:
Then fetch the file itself, which needs no other credential:
The token expires after five minutes and is consumed on first use. Because a browser reaches this URL through a download click and saves whatever comes back, a spent token, a missing attachment, or a file gone from disk answers with a short text file explaining the failure rather than a JSON error body.
Permissions: archives:read_all or ownership through archives:read_own. Printer access is not required, and neither is camera:view — the attached copy is an archive asset. 404 if this archive has no attached timelapse.
Printer-side files found by the endpoint above are fetched through the printer download job endpoints instead, which require printers:files.
Update Archive¶
Request:
{
"print_name": "Updated Name",
"notes": "Great print",
"tags": "functional,gift",
"filament_used_grams": 46.16
}
filament_used_grams is accepted between 0 and 100000 and is written to the archive's most recent run as well, so the filament totals on the Projects page and in the Prometheus metrics — which sum the runs, not the archives — agree with the card. A run that measured its own weight through spool tracking keeps that measurement; only a run with no figure, or one that inherited the archive's, is updated. Nothing is deducted from Spoolman or from internal inventory. It exists for a print that archived without its 3MF, where nothing else can supply a figure: the figure is read out of the 3MF when the print is archived, and such an archive has no file to read. Changing the figure, or setting cost, needs archives:update_all; with archives:update_own the figure can only be filled in on your archive without its 3MF while it has none (403 otherwise).
status accepts completed, failed, aborted or cancelled (422 for anything else) and is written to the most recent run as well. failed and aborted count as failures in the statistics, cancelled as stopped.
cost accepts 0 to 1000000 (422 otherwise). A completed most recent run that had the archive's cost (or none) gets the new cost too, so the statistics and project totals agree with the card; a run priced from its own spools, and a failed or cancelled one, keep theirs. Recalculate costs (POST /archives/recalculate-costs) updates such a run the same way.
While the archive is being reprinted (status is printing), its most recent run is the previous print's: an edit then changes the archive only, and none of the fields above reach that run.
Delete Archive¶
Download 3MF¶
Returns the 3MF file as a download. Add ?inline=true to open it instead of saving it.
Attach a Source 3MF by Name¶
For slicer post-processing scripts: attaches the project 3MF (the unsliced source) to the most recent archive matching the name, replacing a source it already had: an exact print name first, then a file name starting with it, then a print name containing it. Send the file as multipart file; it must be a .3mf. Without print_name the file name is used, with a trailing _source dropped (Benchy_source.3mf → Benchy). Only archives on printers you may use are matched.
curl -H "X-API-Key: your-key" -F "file=@Benchy_source.3mf" \
"http://localhost:8000/api/v1/archives/upload-source?print_name=Benchy"
Response: {"status": "uploaded", "archive_id": 123, "archive_name": "Benchy", "source_3mf_path": "...", "filename": "Benchy_source.3mf"}
Errors: 400 not a 3MF · 404 no archive matches the name
Permission: archives:update_all
Merge Duplicate Archives¶
Archives holding the same file (same content), owned by the same user and in the same project merge into the oldest of them, which takes in their runs, photos, videos and files; the others are hidden. GET /archives/{id} of a merged id returns the archive it went into, and a queued print of one prints it; the other per-archive routes answer 404 for a merged id. See Merging duplicates.
GET /archives/merge-preview lists the groups:
{"groups": [{"survivor": {"id": 12, "print_name": "Planter", "filename": "Planter.3mf", "created_at": "2026-09-01T09:00:00", "run_count": 2},
"merged": [{"id": 31, "print_name": "Planter", "filename": "Planter.3mf", "created_at": "2026-10-02T10:00:00", "run_count": 1}],
"skipped": null}]}
skipped is busy (an archive of the group is printing, queued, being dispatched, tracked by Spoolman, sliced or edited, or finished printing in the last 30 minutes) or conflicting_files (different source 3MF / F3D files, or a hand-attached video beside another), else null.
GET /archives/merge-count returns {"groups": 3}: how many groups there are, whether or not one can merge now. It is cheap (it reads no files), for offering the merge.
POST /archives/merge with {"survivor_ids": [12, ...]} merges each listed group as it stands at that moment and returns {"merged": [{"survivor_id": 12, "merged_ids": [31]}], "skipped": [{"survivor_id": 40, "reason": "busy"}]}. A reason can also be failed (that group was rolled back; the others still merged) or not_a_group.
Permission: archives:update_all and archives:delete_all. A user limited to some printers only sees and merges archives every print of which ran on their printers.
Export Archives¶
Query Parameters:
| Parameter | Type | Description |
|---|---|---|
format | string | csv or xlsx |
printer_id | int | Filter by printer |
project_id | int | Filter by project |
status | string | completed, failed, aborted, cancelled or printing; several comma-separated (failed,aborted) |
date_from | string | From this date (YYYY-MM-DD) or date and time (ISO) |
date_to | string | To this date, inclusive (YYYY-MM-DD), or date and time (ISO) |
tz | string | IANA time zone a plain date is a calendar day in; Bambuddy's own TZ when omitted or not a zone. A date and time without an offset is UTC |
search | string | Search query |
fields | string | Comma-separated columns to include, from the columns below (400 for any other) |
One row per print: the archive's file columns (id, print_name, filename, project_name, tags, notes, the slicer settings, created_at) repeated on each, then that print's own run_id, status, printer_id, printer_name, plate_id, started_at, completed_at, duration_seconds, filament_type, filament_used_grams, cost, energy_kwh, energy_cost, wear_cost, failure_reason, user_verdict and quantity. An archive printed before prints were logged as runs is one row of its own fields, with no run_id.
printer_id, status, date_from and date_to pick prints (the dates by when the print started; an archive without runs by when it was created). project_id and search pick archives. A user limited to some printers gets only the prints on theirs; a file they see whose every print ran elsewhere is one row with empty print columns.
Projects¶
List Projects¶
Get Project¶
Create Project¶
Request:
{
"name": "Voron Build",
"description": "Building a Voron 2.4",
"color": "#4caf50",
"target_count": 100
}
Update Project¶
Delete Project¶
Print Queue¶
Get Queue¶
Query Parameters:
| Parameter | Type | Description |
|---|---|---|
printer_id | int | Filter by printer |
status | string | pending, printing, completed |
Add to Queue¶
Request:
Remove from Queue¶
Reorder Queue¶
Request:
Only pending items move. Positions must be unique.
List Batches¶
Query Parameters:
| Parameter | Type | Description |
|---|---|---|
status | string | active, completed, or cancelled |
Batches with neither queue items nor per-plate targets are omitted — see Batch Orders. Fetching one by id (GET /queue/batches/{batch_id}) returns it regardless.
Create Batch or Order¶
Without plates this creates a plain grouping: pass item_ids to group existing pending items, or omit them and pass the returned id as batch_id on later POST /queue calls. With plates it becomes an order that records how many runs of each plate are wanted, so a failed run still counts as owed.
Request:
{
"name": "Bracket run",
"library_file_id": 42,
"plates": [
{ "plate_id": 1, "quantity_target": 1 },
{ "plate_id": 2, "quantity_target": 2 },
{ "plate_id": 3, "quantity_target": 3 }
],
"due_date": "2026-09-01T12:00:00Z",
"notes": "Rush job"
}
plate_id is null for a single-plate file. A quantity_target of 0 is allowed — a plate that is not required yet keeps its row so the target can be raised later — but an order in which every target is 0 is rejected.
Update an Order¶
Every field is optional. Supplying plates replaces the whole target set, so a plate left out of the list has its target row removed. Lowering a target below what has already been dispatched is allowed and simply leaves nothing owed; queued items are never cancelled implicitly.
Request:
Dispatch Remaining Runs¶
Creates queue items for the runs the order still owes. Each is copied from the most recent item for that plate, inheriting its printer or model target, AMS mapping, filament overrides and print options, and is appended to the end of the relevant printer's queue.
Request:
| Field | Type | Description |
|---|---|---|
plate_id | int | null | Which plate to dispatch. Only read when only_plate is true |
only_plate | bool | Restrict to the single plate named above. Default false — every plate with work outstanding |
limit | int | Cap on items created across all plates. Omit to queue everything owed |
Returns 400 when a plate owes runs but has never been queued, since there is no existing item to copy settings from, and when the batch has been cancelled.
Ungroup a Batch¶
Clears batch_id from every member the caller owns. The batch row is deleted once no members remain.
Cancel a Batch¶
Cancels the batch's pending items and marks the batch cancelled. Items that have already run are untouched.
Scheduled Drying Sessions¶
Get Scheduled Drying Sessions¶
Query Parameters:
| Parameter | Type | Description |
|---|---|---|
printer_id | int | Filter by printer |
Returns sessions that are pending, running, or failed, earliest start time first, with sessions that have no start time ahead of the rest. Completed and cancelled sessions are not returned.
Permission: printers:read
Create Scheduled Drying Session¶
Request:
{
"printer_id": 1,
"ams_id": 2,
"temp": 45,
"duration_hours": 12,
"filament": "PLA",
"rotate_tray": true,
"start_after": "2026-07-26T18:00:00Z"
}
start_after is the earliest start, and it is optional: omit it (or send null) and the session runs as soon as the printer is idle and the AMS is ready. The drying popover has no equivalent — its Now option starts drying immediately through POST /printers/{id}/drying/start instead — so this is an API-only way to say "next time the printer is free".
Permission: printers:control
Cancel or Dismiss Scheduled Drying Session¶
Cancels a pending or running session and responds with {"status": "cancelled"}. A running session is also sent a stop command. On a failed session the record is deleted instead, and the response is {"status": "dismissed"}.
Permission: printers:control
Spool Inventory¶
List Spools¶
Query Parameters:
| Parameter | Type | Description |
|---|---|---|
include_archived | bool | Include archived spools (default false) |
Get Spool¶
Find Spool by Tag¶
Look up a single spool by its NFC tag identifiers without listing the whole inventory. This is intended for NFC inventory integrations that scan a Bambu Lab spool tag and need to check whether it already exists before creating or updating it.
Query Parameters:
| Parameter | Type | Description |
|---|---|---|
tray_uuid | string | Bambu Lab spool UUID from the tag — the same value the AMS reports over MQTT |
tag_uid | string | RFID tag UID |
include_archived | bool | Include archived spools (default false) |
At least one of tray_uuid or tag_uid must be supplied. Values are normalised (case-insensitive, non-hex separators ignored). tray_uuid is matched first and tag_uid is used as a fallback. Returns the single matching spool.
Response:
{
"id": 42,
"material": "PLA",
"brand": "Bambu",
"color_name": "Red",
"tray_uuid": "AABBCCDDEEFF0011AABBCCDDEEFF0011",
"tag_uid": "04A1B2C3"
}
Errors:
400- Neithertray_uuidnortag_uidwas provided404- No matching spool found
Required scope
This endpoint accepts inventory read or inventory update access — for API keys, either the Read Status scope or the Manage Inventory scope. This lets a key that can already create, update, and delete spools look one up to dedupe an NFC scan. (Listing spools and fetching a spool by id still require Read Status.)
Statistics¶
Get Statistics¶
Query Parameters:
| Parameter | Type | Description |
|---|---|---|
date_from | date | Period start, YYYY-MM-DD (inclusive) |
date_to | date | Period end, YYYY-MM-DD (inclusive) |
tz | string | IANA time zone the dates are calendar days in (e.g. Europe/Berlin); Bambuddy's own TZ when omitted or not a zone |
created_by_id | int | Only prints by this user (-1: prints with no user) |
Response (excerpt):
{
"total_prints": 1234,
"successful_prints": 1100,
"failed_prints": 100,
"cancelled_prints": 34,
"total_print_time_hours": 1000.5,
"total_filament_grams": 15000.5,
"total_cost": 350.0,
"total_energy_kwh": 120.4,
"total_energy_cost": 36.1,
"prints_by_filament_type": {"PLA": 900, "PETG": 334},
"prints_by_printer": {"1": 800, "2": 434}
}
Export Statistics¶
| Parameter | Type | Description |
|---|---|---|
format | string | csv (default) or xlsx |
days | int | How many days back (default 30) |
printer_id | int | Filter by printer |
project_id | int | Filter by project |
created_by_id | int | Only prints by this user (-1: prints with no user) |
Camera¶
An <img> or <video> tag cannot send an Authorization header, so the stream and snapshot endpoints also accept a token in the query string. Pass either a 60-minute browser token (POST /printers/camera/stream-token) or a long-lived camera token — see Long-Lived Camera Tokens.
Stream (MJPEG)¶
Returns MJPEG stream. Query params:
| Parameter | Type | Description |
|---|---|---|
fps | int | Frames per second (1-30) |
token | string | Camera token, when auth is enabled |
viewer | string | Optional id of this viewer, repeated on its stop call (see Stop Stream) |
Snapshot¶
Returns single JPEG image. Accepts the same token query param.
Stop Stream¶
Terminates active streams for printer. The shared stream of a built-in camera is left running while any viewer is still attached. For an external camera (RTSP, USB), pass the viewer id you put on your stream URL (letters, digits, - and _, up to 64): your own streams end, as does any that has sent no picture for 10 seconds, and other viewers' streams keep running. Without viewer, every stream of the printer ends.
Cam Wall¶
Wall Feed¶
Every printer plus the handful of status fields a Cam Wall tile draws. One call for the whole wall — a kiosk display polls this on a fixed interval with no WebSocket to invalidate it.
| Parameter | Type | Description |
|---|---|---|
token | string | A Cam Wall-scoped camera token, when auth is enabled |
Authenticated only by a camwall-scoped token. A camera_stream token is refused here — it was minted to hand out video, not to enumerate a fleet by name.
[
{
"id": 1,
"name": "X1C-Lab",
"camera_rotation": 0,
"connected": true,
"state": "RUNNING",
"progress": 42.0,
"remaining_time": 33,
"layer_num": 120,
"total_layers": 300,
"hms_errors": []
}
]
That list is the entire payload. It deliberately carries no serial_number, no ip_address, no access_code, and no print filename: the token travels in a URL displayed on a screen, so the feed behind it must not disclose more than the camera picture already does.
Streaming Overlay¶
Overlay Status¶
Everything the streaming overlay draws for one printer — name, model, camera rotation, live print state, temperatures, and the one display setting it reads. A token-authenticated sibling of the printer status endpoint, so an OBS browser source with no login session can back the overlay.
| Parameter | Type | Description |
|---|---|---|
token | string | A Streaming Overlay-scoped camera token, when auth is enabled |
Authenticated only by an overlay-scoped token. A camwall or camera_stream token is refused here — unlike the Cam Wall feed this names the file being printed, so it sits behind its own scope.
{
"id": 1,
"name": "X1C-Lab",
"model": "X1C",
"camera_rotation": 0,
"connected": true,
"state": "RUNNING",
"current_print": "Benchy.gcode.3mf",
"gcode_file": "Metadata/plate_1.gcode",
"progress": 42.0,
"remaining_time": 33,
"layer_num": 120,
"total_layers": 300,
"stg_cur_name": null,
"temperatures": {"nozzle": 219.7, "nozzle_target": 220.0, "bed": 60.0, "bed_target": 60.0},
"time_format": "system"
}
model is null when the printer has none stored. temperatures holds only the readings the printer reports and is {} when it reports none; chamber readings are left out on models without a real chamber sensor.
That object is the entire payload. Like the Cam Wall feed it carries no serial_number, ip_address, or access_code — but it does carry the print filename, which is why the overlay scope is distinct from camwall.
Overlay branding logo¶
All paths below are relative to /api/v1. The logo is shared by the installation.
| Method | Path | Purpose | Permission when login is enabled |
|---|---|---|---|
POST | /settings/overlay-logo | Upload multipart file | settings:update |
GET | /settings/overlay-logo | Read PNG for settings preview | settings:read |
DELETE | /settings/overlay-logo | Remove saved logo | settings:update |
GET | /overlay-branding/logo?token=... | Read PNG for OBS | Valid overlay token |
Uploads accept static PNG and WebP images up to 2 MiB and 4 million pixels. Images are decoded, resized to fit 512 × 512, and stored as PNG with transparency. Invalid images return 400; oversized uploads return 413. Reading a missing logo returns 404. Reads use Cache-Control: no-store. Upload and delete return {"status":"ok"}. Deleting an absent logo succeeds.
OctoEverywhere AI Failure Detection¶
For setup, inspection timing, and recovery from usage limits or account errors, see AI Failure Detection.
Settings¶
Read these fields with GET /settings/ and update them with PUT /settings/. When authentication is enabled, these endpoints require settings:read and settings:update, respectively. Omitted fields are preserved by a settings update.
| Key | Default / values |
|---|---|
octoeverywhere_enabled | false |
octoeverywhere_api_key | Write-only Gadget API key. Omit it from an update to preserve the saved key; send an empty string to clear it. Always empty in settings responses and excluded from Git backups. |
octoeverywhere_api_key_configured | Read-only boolean indicating whether a key is saved; defaults to false. |
octoeverywhere_poll_interval | 20 by default; an integer from 5 to 30 seconds. Normally clamped to the server minimum; temporarily shortened to the recommended interval when FasterInspectionSuggested is true, still respecting the minimum. |
octoeverywhere_confidence | medium; accepts lowest, low, medium, high, highest, sent as API confidence levels 1, 2, 3, 4, 5 respectively for both WarningConfidenceLevel and PauseConfidenceLevel. |
octoeverywhere_action | notify; accepts notify, pause, pause_and_off. |
octoeverywhere_enabled_printers | Empty string (default) for all printers, or a JSON-encoded array of printer IDs; "[]" monitors none. |
For example, to select printers 1 and 2 and use a 30-second interval while preserving the saved key and other settings:
Status and Test Endpoints¶
All paths below are relative to the /api/v1 base URL.
| Endpoint | Purpose | Permission when authentication is enabled |
|---|---|---|
GET /octoeverywhere/status | Service status, last_error_code, api_key_configured, poll_interval, per-printer quality, recent history, and notification coverage. Printer data, history, and coverage are limited to the caller's accessible printers. | settings:read |
GET /octoeverywhere/printer-status | Printer-card monitoring state, limited to the caller's accessible printers. Error messages and codes also require settings:read. | printers:read |
POST /octoeverywhere/test-connection | Test key/account eligibility using optional api_key and confidence fields, falling back to saved settings when omitted. Does not update settings or upload an image. | settings:update |
Send an empty JSON object ({}) to test the saved settings. Sending an empty api_key tests with no key. The confidence field accepts the same five values as octoeverywhere_confidence.
A successful test with the configured key resumes blocked inspections and preserves existing monitoring contexts, but it does not verify the remaining inspection allowance. The next inspection can stop monitoring again if the allowance is still exhausted. See Troubleshooting OctoEverywhere for account recovery steps.
Notification providers use the existing on_ai_failure_detection event subscription. The status response's notifications.configured indicates that an enabled provider subscribes to this event for all printers or a printer within the caller's scope; notifications.uncovered_printers lists monitored active printer IDs within that scope without a matching subscription. These fields describe configuration, not successful notification delivery.
Each per-printer status and Test result includes a nullable error_code. Status responses also include last_error_code alongside last_error. These codes identify known API errors without exposing remote response details. In the printer-status response, error messages and codes are null for callers without settings:read.
System¶
System Info¶
Response (trimmed):
{
"app": {"version": "1.2.6b1"},
"database": {"engine": "SQLite", "archives": 1234},
"printers": {"total": 3, "connected": 2},
"storage": {"database_size_bytes": 47815065},
"system": {"uptime_seconds": 86400}
}
Sections: app, database, printers, storage, system, memory, cpu.
Permission: system:read
Health Check¶
At the server root, not under /api/v1, and without authentication.
Response:
Error Responses¶
Error Format¶
HTTP Status Codes¶
| Code | Meaning |
|---|---|
| 200 | Success |
| 201 | Created |
| 400 | Bad Request |
| 401 | Unauthorized (no/invalid API key) |
| 403 | Forbidden (insufficient permissions) |
| 404 | Not Found |
| 429 | Rate Limited |
| 500 | Server Error |
Rate Limits¶
The API has no general request limit and sends no rate-limit headers. A few routes answer 429 when repeated too often:
| Route | Limit |
|---|---|
| Login | 10 failed attempts per username and 20 per IP address in 15 minutes |
| 2FA code | 5 failed attempts in 15 minutes |
| Email code | 3 sends in 10 minutes |
| Password reset email | 3 per address and 10 per IP address in 15 minutes |
POST /notifications/app-message | 20 per minute per API key or user |
POST /connect/token (connected apps) | 20 failed exchanges per app and per IP address in 15 minutes |
Content Types¶
Request¶
Response¶
Except for file downloads (application/octet-stream) and images (image/jpeg).
Webhooks¶
Bambuddy can send webhooks for events. Configure in Settings > Notifications.
Webhook Payload¶
The payload is flat: title, message, timestamp, source, event, and the event's own values as top-level fields.
{
"title": "Print Completed",
"message": "Workshop X1C: benchy\nTime: 2h 15m\nFilament: 15.2g",
"timestamp": "2026-04-02T14:30:00.123456",
"source": "Bambuddy",
"event": "print_complete",
"app_name": "Bambuddy",
"printer": "Workshop X1C",
"filename": "benchy",
"duration": "2h 15m"
}
See Notifications for every field and the Slack format.
Event Types¶
| Event | Trigger |
|---|---|
print_start | Print begins |
print_progress | Progress milestone |
print_complete | Print finishes |
print_failed | Print fails |
print_stopped | Print is stopped |
printer_offline | Connection lost |
printer_error | HMS error |