Melt3D slicer API
Slice from your own code.
Send a binary STL and your print settings to our slice servers and get printable G-code back, from your own app, printer farm or pipeline.
Scroll to readWhat the API does
One HTTP request turns a model and its print settings into G-code, sliced on Melt3D's servers.
You post a binary STL to https://api.melt3d.eu/v1/slices with the settings as query parameters, and the answer is the G-code file. There is no slicer to install, update or keep running on your side: an app can offer slicing without shipping one, and a printer farm can slice incoming orders from the same script that queues them.
The slice runs in PrusaSlicer by default. CuraEngine and OrcaSlicer are there too, picked with one parameter, so you can match the engine your printers' profiles were tuned for.
Quickstart
Create a key on the developers page (new accounts start with 1 € of free credit), then slice a model at 0.2 mm layers with 20% infill:
curl "https://api.melt3d.eu/v1/slices?layer_height=0.2&infill_density=20" \
-H "Authorization: Bearer m3d_live_..." \
-H "Content-Type: model/stl" \
--data-binary @part.stl \
-o part.gcode
Large models upload faster gzipped. Add Content-Encoding: gzip and send the compressed file:
gzip -c part.stl | curl "https://api.melt3d.eu/v1/slices?engine=orcaslicer" \
-H "Authorization: Bearer m3d_live_..." \
-H "Content-Type: model/stl" \
-H "Content-Encoding: gzip" \
-H "Idempotency-Key: order-1042-part-3" \
--data-binary @- \
-o part.gcode
The Idempotency-Key header makes retries safe: if a request times out on your side and you send it again with the same key within 24 hours, you are billed for one slice.
Request and answer
Every setting is an optional query parameter on POST https://api.melt3d.eu/v1/slices. Leave one out and the engine's default applies. The full, machine-readable description is the OpenAPI document. The developer guide, in Markdown for people and AI assistants alike, is at https://api.melt3d.eu/llms.txt, and https://api.melt3d.eu/ itself leads back to this page.
engineprusaslicer(the default),curaengineororcaslicerlayer_height- Layer height, in mm
first_layer_height- First layer height, in mm
perimeters- Number of perimeters
infill_density- Infill density, in percent
infill_pattern- Infill pattern, such as
gridorgyroid nozzle_temp- Nozzle temperature, in °C
bed_temp- Bed temperature, in °C
brim_width- Brim width, in mm
supportsnone, orbedfor supports that stand on the bedfilename- The name of the model, for the G-code file
The request
The body is the binary STL, sent as Content-Type: model/stl, optionally gzipped with Content-Encoding: gzip, up to 100 MiB inflated. Your key goes in the Authorization: Bearer header.
The answer
A slice that succeeds answers with the G-code. Anything else answers with an error as problem details JSON (RFC 9457), which says what went wrong in a form your code can read.
Keys
Create keys on the developers page once you have accepted the API terms. New accounts start with 1 € of free credit; add a payment method to keep slicing after it.
Keys are shown once. Lost one? Replace it; the old one stops working. Up to 3 keys per account.
- Slices at a time, per key
- 4
- Requests a minute, per key
- 120
- Waiting for a server
- Up to 60 seconds for a free server slot
- Time to answer
- 95 seconds, waiting included; a slice past it is stopped and not billed
- Largest model
- 100 MiB of STL, after gzip is inflated
Most slices take seconds. A very large or very detailed model can run past 100 seconds: slice it in parts. A job endpoint for long slices, which answers at once and lets you collect the G-code later, is planned.
Use it from an AI agent
An MCP server lets Claude, Cursor and other MCP clients slice the STL files on your computer through the API.
It is the npm package @melt3d/nonplanar-slicer-mcp, and its source is in the Melt3D slicer repository. Ask your assistant to slice a model and it sends the STL to the API, writes the G-code beside the model and tells you the number of layers, the print time and the filament it needs.
To add it to Claude Code, run:
claude mcp add meltslicer --env MELT3D_API_KEY=m3d_live_... -- npx -y @melt3d/nonplanar-slicer-mcp
For Claude Desktop, Cursor and other clients, add it under mcpServers in the client's MCP configuration:
{
"mcpServers": {
"meltslicer": {
"command": "npx",
"args": ["-y", "@melt3d/nonplanar-slicer-mcp"],
"env": { "MELT3D_API_KEY": "m3d_live_..." }
}
}
}
The server gives the assistant two tools, slice_model and slicer_settings. The G-code it writes is printable. Retries after a busy or rate-limited answer are billed once.
Pricing
You pay only for slices answered with G-code: 0.10 € per flat slice and 0.20 € per conical slice, billed monthly through Stripe.
A request that is refused or fails costs nothing, and a retry with the same Idempotency-Key within 24 hours is billed once.
New accounts start with 1 € of free credit, no card needed.
Every account has a monthly spending cap, 100 € unless you change it on the developers page. When a month's slices reach the cap, your keys stop slicing, so a runaway script cannot run up a bill you did not plan for.
Frequently asked questions
How do I slice an STL file through an API?
Send the binary STL as the body of a POST request to https://api.melt3d.eu/v1/slices, with your API key in the Authorization: Bearer header and your print settings as query parameters. The answer is the G-code file. The quickstart on this page has a curl command that does it.
Which slicing engines are supported?
PrusaSlicer, CuraEngine and OrcaSlicer. PrusaSlicer is the default; pick another with the engine query parameter, set to prusaslicer, curaengine or orcaslicer.
Is there a free tier?
Every new account starts with 1 € of free credit, no card needed. Add a payment method before it runs out.
How is it billed, and is there a spending cap?
Per slice answered with G-code at 0.10 € a flat slice and 0.20 € a conical one, monthly through Stripe. Refused and failed requests cost nothing, and a retry with the same Idempotency-Key within 24 hours is billed once. Every account has a monthly spending cap, 100 € unless you change it: when a month's slices reach it, keys stop slicing until the next month or until you raise the cap.
Can I use it from an AI agent or with MCP?
Yes. The MCP server @melt3d/nonplanar-slicer-mcp lets Claude, Cursor and other MCP clients slice STL files on your computer through the API, and writes the G-code beside each model. To write code against the API, an assistant can read the developer guide at https://api.melt3d.eu/llms.txt and the OpenAPI document at https://api.melt3d.eu/v1/openapi.json.
Which file formats does it take?
STL, up to 100 MiB after gzip is inflated, and the answer is G-code. Conical layers need binary STL. Export a 3MF, OBJ, STEP or other model as STL first.
What are the rate limits?
Each key runs 4 slices at a time and 120 requests a minute. A slice waits up to 60 seconds for a free server slot, and one that cannot answer within 95 seconds in all is stopped and not billed. Requests over a limit are refused and cost nothing.
What if I lose an API key?
Replace it on the developers page; the old one stops working. Keys are shown once and cannot be recovered.
What does Melt3D store about my account and my models?
Melt3D keeps no API data in a database of its own. Stripe holds your payments and invoices, and on your Stripe customer the version of the API terms you accepted, your spending cap and the names of your keys. Auth0 holds your Melt3D account. Both process this data for Melt 3D s.r.o. Models are not stored after their slice, G-code is cached for a limited time so the same slice is not run twice, and server logs keep a key id that names your Stripe customer, never the key, for 14 days.
Is the G-code printable?
Yes. Check G-code before you print it, in a G-code viewer or with a test print, since it is only as good as the settings you send.
Start slicing.
Create a key now: new accounts start with 1 € of free credit, no card needed. Using the API means accepting the API terms.