Creating Quotes
A quote is a price + print-time estimate for a specific file, printer, and filament combination. Under the hood Cloud Slicer slices your model, which can take anywhere from a few seconds to a couple of minutes โ so the API is async: you queue a job, then poll until it finishes. This is the same flow the embedded Cloud Slicer widget uses.
Prerequisites
Before you can quote, you need:
- A
file_idโ see Managing Files. - A
printer_idโ create one at dashboard/printers/new. - A
filament_idโ create one at dashboard/filaments/new. - Your API token in the
Authorization: Bearer ...header.
Queue a quote
POST /v1/quote/queue/{file_id} accepts a JSON body with at minimum printer_id and filament_id. Everything else (slicer_model, pricing_config, print_settings) is optional and falls back to sensible defaults. The response is 202 Accepted with a quote_id you'll poll on.
Want to override defaults? You can also pass pricing_config (currency, cost-per-hour, cost-per-gram, base price, electricity) and print_settings (layer height, infill, supports, filament color, etc.) in the same body. Both default to Cloud Slicer's reasonable defaults if omitted.
Poll until ready
GET /v1/quote/{quote_id} returns the quote's current state. The status field starts as "pending" and ends at "success" or "failed". Poll every couple of seconds with a sane timeout.
What you get back
A successful quote response includes:
pricing.total_priceโ the all-in price (number)pricing.filament_cost,pricing.electricity_cost,pricing.currencyโ cost breakdownpricing.filament_weightโ grams of filament the print will usetime.estimated_timeโ human-readable (e.g."2h 30m")time.estimated_time_secondsโ number of seconds, useful for mathfiles.gcode_path,files.gcode_nameโ the generated g-code, ready to downloadconfigurations.printer_config,configurations.filament_config,configurations.print_configโ the exact configs used so you can reproduce the slice
The "fits printer" check the widget shows is computed client-side from the model's bounding box vs. your printer's bed โ it isn't a field on the quote response.
Download the g-code
Once the quote is "success", GET /v1/quote/gcode/{quote_id} streams the sliced g-code back to you.
Clean up a quote
DELETE /v1/quote/{quote_id} deletes a quote record and its g-code file. Useful for cleanup after you've fetched what you need.
A note on the synchronous endpoint
You'll also see POST /v1/quote/{file_id} in the API reference โ that's the deprecated synchronous quote endpoint. It blocks until slicing finishes (or the connection times out), which is fragile for any file larger than a benchy. Use the queue + poll flow above unless you have a very specific reason not to.