# Formlabs Developer Portal > Python SDK, PreForm API, and Web API documentation for building on Formlabs printers - getting started, runnable examples, and reference links. Every page on this site has a Markdown copy: the page's URL with its trailing slash replaced by `.md`, as linked below. [llms-full.txt](https://developer.formlabs.com/llms-full.txt) is every guide and example in one file. Each API reference page below lists its endpoints and schemas, and each endpoint and schema has a Markdown copy of its own; the specification has them all. ## Before you write code - Install the SDK with `pip install "formlabs-sdk @ git+https://github.com/Formlabs/formlabs-api-python"` (Python 3.11 or newer). - Import `FormlabsClient` from `formlabs_sdk`, or `AsyncFormlabsClient` for asyncio; both have the same methods. `client.preform` is the PreForm API. - `client.preform.launch(exe)` starts a PreForm Server process; `client.preform.connect()` attaches to one already running, such as the one inside the PreForm app; both default to port 44388. Every other PreForm method raises `PreFormApiError` with code `NOT_CONNECTED` until one of them has run. - PreForm methods are the specification's operationIds in snake_case (`create_scene`, `import_models`, `auto_orient_models`, ...) and take the request body's fields as keyword arguments. Structured values take the model classes from `formlabs_preform_api.models`. - Long-running operations are started asynchronously and polled behind one call; pass `timeout`, `poll_interval` or `on_progress` rather than polling yourself. - Every error derives from `FormlabsError`. Match on `.code`; the codes are listed on the Errors page of the API reference. - Every endpoint in the API reference has a Python sample that calls the SDK, and each sample is run against the SDK in CI. ## API specification - [PreForm API v1, OpenAPI 3 (YAML)](https://developer.formlabs.com/reference/openapi-v1.yml): the document the reference pages and the SDK's client are generated from, PreForm API v1.0.0-alpha, the latest release (formlabs-sdk v1.0.0-alpha). ## Get started - [Get started](https://developer.formlabs.com/getting-started.md): Install the Formlabs Python SDK, connect a script to PreForm, and reach Dashboard. - [Install the Developer Kit](https://developer.formlabs.com/getting-started/install.md): Install the Formlabs Python SDK, then connect a Python script to PreForm and prepare a model in its window. - [Create your first script](https://developer.formlabs.com/getting-started/quickstart.md): Prepare an STL file in PreForm from a Python script, then queue it on a printer or save it as a .form file. - [PreForm client](https://developer.formlabs.com/core-concepts/preform-client.md): The PreForm client is the SDK's handle to the PreForm API of one PreForm or PreForm Server process. - [Scene](https://developer.formlabs.com/core-concepts/scene.md): A scene is the server-side state of one build, the models and settings a job is created from. - [Print settings](https://developer.formlabs.com/core-concepts/print-settings.md): A print setting is one combination of printer type, material, layer thickness, and setting variant that Formlabs ships, or a custom one saved in an .fps file. - [Model](https://developer.formlabs.com/core-concepts/model.md): A model is a mesh loaded into a scene, with its placement and its supports. - [Validate](https://developer.formlabs.com/core-concepts/validate.md): The printability checks report, per model, whether a scene will print as it is: holes, thin walls, cups, unsupported minima, undersupported area, fit, and collisions. - [Job](https://developer.formlabs.com/core-concepts/job.md): A job is what a printer runs, sliced from a scene and sent to a printer or a group queue. - [Operation](https://developer.formlabs.com/core-concepts/operation.md): An operation is a long-running PreForm API request that runs in the background in PreForm. - [Dashboard client](https://developer.formlabs.com/core-concepts/dashboard-client.md): A Dashboard client calls the Formlabs Web API, the API behind Dashboard, with a developer token from the SDK. - [Device](https://developer.formlabs.com/core-concepts/device.md): A device is a printer, or a Printer Group, that a job can go to, as the PreForm API lists it. - [Group](https://developer.formlabs.com/core-concepts/group.md): A Printer Group is a set of printers in a Dashboard account that share a group queue and access. - [Queue](https://developer.formlabs.com/core-concepts/queue.md): A queue holds print jobs until a printer starts them. The printer's own queue and the group queue in Dashboard. - [Headless PreForm Server](https://developer.formlabs.com/guides/headless-preform-server.md): Install PreForm Server, PreForm without its window, and start it from the Python SDK to run scripts headless. ## Examples - [Examples](https://developer.formlabs.com/examples.md): Complete scripts built on the Formlabs Python SDK, each with a walkthrough and a download. - [Printability report](https://developer.formlabs.com/examples/printability-report.md): Grade a folder of STL files PASS, WARN, or FAIL for printing, with the checks behind each grade and a picture of each part that did not pass. - [Instant quote](https://developer.formlabs.com/examples/instant-quote.md): Quote a price for a part in each material on a price list, with the print time, the resin including supports, and the cost of resin, machine time, and setup. - [Dental presets](https://developer.formlabs.com/examples/dental-presets.md): Turn a case's scans into a print-ready .form file for orthodontic models, restorative models, occlusal guards, or surgical guides, set up the way PreForm's dental presets set them up. - [Print setting rollout](https://developer.formlabs.com/examples/print-setting-rollout.md): Move a queue of jobs from one print setting to another, with a preview of the layer counts and print times before anything is saved. - [Part labels](https://developer.formlabs.com/examples/part-labels.md): Turn a finished build into a report for post-processing and billing, with every part matched to its customer order, the material it used, and a bag label with its picture. - [Web SLS Packer](https://developer.formlabs.com/examples/web-sls-packer.md): A web application that packs Fuse 1+ and Fuse X1 jobs from a browser, with PreForm Server behind it. ## API reference - [API reference](https://developer.formlabs.com/api-reference.md): Every endpoint of the PreForm API, from the OpenAPI specification the Python SDK is generated from. - [Server Info](https://developer.formlabs.com/api-reference/server-info.md): Endpoint for checking that the server is up and reachable. - [Authentication](https://developer.formlabs.com/api-reference/authentication.md): Endpoints for checking and managing your Formlabs Dashboard account login state. Endpoints that call Formlabs web services need a login session, and say so in their descriptions. - [Scenes](https://developer.formlabs.com/api-reference/scenes.md): Create, load, and enumerate scenes. A scene is the top-level unit of work: it holds a printer/material/print-setting combination and the models placed within that printer's build volume. - [Modifying Models](https://developer.formlabs.com/api-reference/modifying-models.md): Endpoints that take actions on models within a scene. - [Printability Checks](https://developer.formlabs.com/api-reference/printability-checks.md): Scene printability checks. These endpoints analyze the scene and report problems. They never modify it. - [Print Settings](https://developer.formlabs.com/api-reference/print-settings.md): The catalog of machine/material/layer-thickness/print-setting combinations Formlabs ships settings for, and validation of a candidate combination against that catalog. - [Operations](https://developer.formlabs.com/api-reference/operations.md): Poll and manage the long-running operations started by endpoints called with `?async=true`. `/v1/operation/get/` returns one operation's status and, once finished, its result. See the *Asynchronous requests* section of the introduction. - [Devices](https://developer.formlabs.com/api-reference/devices.md): Enumerate printers and Fleet Control printer groups PreForm knows about, discover new ones on the network, and upload firmware to them. Discovering Dashboard-registered printers and Fleet Control queues requires a Dashboard login (`/v1/login/`). - [Errors](https://developer.formlabs.com/api-reference/errors.md): The shared error envelope and the registry of stable error codes. See the *Errors* section of the introduction for the contract. - [Schemas](https://developer.formlabs.com/api-reference/schemas.md): Every schema in the PreForm API 1.0.0-alpha specification. ## Resources - [Resources](https://developer.formlabs.com/resources.md): What changed in each release, where to download PreForm Server and the example bundles, PreFormServer's command-line options, the machine-readable docs for coding agents, and where to get help. - [Release notes](https://developer.formlabs.com/resources/release-notes.md): Where to find the release notes for the PreForm API, PreForm, and printer firmware, on the Formlabs support site. - [Downloads](https://developer.formlabs.com/resources/downloads.md): Download links for PreForm Server, PreForm, the Formlabs Python SDK, and Dashboard developer credentials, plus the bundle for each example. - [Support & forum](https://developer.formlabs.com/resources/support.md): Where to get help with the PreForm API and the Formlabs Python SDK, from Formlabs Support and the Formlabs community forum. - [CLI & command-line options](https://developer.formlabs.com/resources/preform-server-cli.md): PreFormServer command-line options, such as --port and --scene-cache-size, how to start the server, and the DISABLE_PREFORMSERVER_TELEMETRY variable. - [For coding agents](https://developer.formlabs.com/resources/for-coding-agents.md): The Markdown copies, llms.txt index, and OpenAPI specification a coding agent can read to write PreForm SDK automations, and how to point an agent at them.