---
title: "Record a print's slicer settings from a connector."
method: POST
path: "/api/Prints/{id}/slicer-settings"
tags: ["Prints"]
---

# Record a print's slicer settings from a connector.

`POST /api/Prints/{id}/slicer-settings`

## Request

- Base URL: `https://api.3dprintlog.com`
- URL: `https://api.3dprintlog.com/api/Prints/{id}/slicer-settings`
- Auth: one of:
  - OAuth 2 (authorization code, authorization URL `https://3dprintlog.auth0.com/authorize`, token URL `https://3dprintlog.auth0.com/oauth/token`)
  - API key in header `X-Api-Key`
  - API key in query parameter `api_key`

For connectors that read the G-code a print came from. Send `configBlock`, the
`; key = value` settings the slicer wrote (at most 512 KiB), with `header`, the start of
the file through `; HEADER_BLOCK_END` (at most 64 KiB), which names the slicer and its
version. OrcaSlicer, PrusaSlicer, Bambu Studio, FLSun Slicer and Anycubic Slicer Next are
read; Anycubic Slicer Next only with its header. When there is no block, send `metadata`,
the summary Moonraker extracts; its `slicer` is then required. With a block, `metadata`
only fills in what the block lacks: the version, and the slicer when there is no header.
            
The print gets its slicer and version, and the settings note the Slic3r uploader would
write, added to the print's notes under a `--- Slicer settings (…) ---` heading. The user's
own notes are kept. How the print was logged (`source`, `externalSource`) does not change.
Host and credential settings (`print_host`, `printhost_*`, anything with `apikey`,
`password`, `token`, `secret` or `user` in its name, `post_process`) are removed before
anything is parsed or stored; the block itself is never stored.
            
Sending again is safe: it replaces the settings and the note an earlier call recorded. A
print whose settings came from the Cura plugin or the Slic3r uploader keeps them, and the
call is a `409`; `hasSlicerSettings` on `GET /api/Prints/claimable` says so up front.
Errors never change the print. Only your own print's settings can be sent.

## Path parameters

- `id` integer, required

## Request body

- PrintLogApiModelsDTOsPrintPrintSlicerSettingsDto: A print's slicer settings as a connector has them (#164): the settings block the slicer wrote into the G-code, Moonraker's metadata summary, or both.
  - `configBlock` string, nullable: The settings block the slicer wrote into the G-code, as text: the `; key = value` comment lines. OrcaSlicer, Anycubic Slicer Next and PrusaSlicer write it at the end of the file (Orca: from `; EXECUTABLE_BLOCK_END`; PrusaSlicer: from the `; filament used` totals through `; prusaslicer_config = end`). Bambu Studio and FLSun Slicer write it near the top, after `; HEADER_BLOCK_END` through `; CONFIG_BLOCK_END`. Toolpaths may be included but are never needed. At most 512 KiB.
  - `header` string, nullable: The start of the file through `; HEADER_BLOCK_END` (PrusaSlicer: its first line). It names the slicer and its version; without it the version is unknown and the slicer is a best guess from the settings. Anycubic Slicer Next can only be told apart from OrcaSlicer by its header. At most 64 KiB.
  - `metadata` PrintLogApiModelsDTOsPrintSlicerMetadataDto: The slicer facts Moonraker's file metadata carries. Every field is optional except PrintLogApi.Models.DTOs.Print.SlicerMetadataDto.Slicer when no settings block is sent.
    - `slicer` string, nullable: The slicer's name as the file reports it, e.g. `OrcaSlicer`, `PrusaSlicer`.
    - `slicerVersion` string, nullable: The slicer's version, e.g. `2.3.1`.
    - `layerHeightMm` number, double, nullable: Layer height in millimetres.
    - `firstLayerHeightMm` number, double, nullable: First layer height in millimetres.
    - `nozzleDiameterMm` number, double, nullable: Nozzle diameter in millimetres.
    - `filamentName` string, nullable: The filament profile's name.
    - `filamentType` string, nullable: The filament's material type, e.g. `PLA`.
    - `firstLayerNozzleTemperatureC` number, double, nullable: The first layer's nozzle temperature in °C.
    - `firstLayerBedTemperatureC` number, double, nullable: The first layer's bed temperature in °C.

## Response `200`

What was recorded.

- PrintLogApiModelsDTOsPrintPrintSlicerSettingsResultDto: What recording a print's slicer settings did.
  - `printId` integer
  - `slicer` string, nullable: The print's slicer now: `cura`, `prusaslicer`, `orcaslicer`, `bambustudio`, `anycubic`, `flsun` or `other`.
  - `slicerVersion` string, nullable: The slicer's version, or null when neither the header nor the metadata gave one.
  - `source` string, nullable: What the settings came from: `configBlock`, or `metadata` when there was no block or it held no settings.
  - `isRecognized` boolean, nullable: For a settings block: true when the header named the slicer, false when it was guessed from the settings. Null for metadata.
  - `settingsCount` integer: How many settings were stored, after credential and host settings were removed.
  - `replaced` boolean: True when this replaced settings an earlier call recorded.
  - `noteAppended` boolean: True when the settings note is in the print's notes. False only when adding it would take the notes past the 50,000 characters the print form accepts; the settings are stored anyway.
  - `note` string, nullable: The rendered settings note.

## Other responses

- `400`: Neither field was sent, the block holds no settings and there is no metadata, or the metadata has no slicer.
- `401`: Returned when no user is authenticated.
- `403`: Forbidden
- `404`: Returned when the print does not exist or is not yours.
- `409`: The print's settings came from a slicer plugin.
- `413`: `configBlock` is over 512 KiB or `header` over 64 KiB.

---

[API](https://skmtc.dev/3dprintlog/apis/3d-print-log-api.md) · [All operations](https://skmtc.dev/3dprintlog/apis/3d-print-log-api/llms.txt) · [OpenAPI document](https://skmtc.dev/3dprintlog/apis/3d-print-log-api/revisions/dfc3a4df4e38?raw)
