POST/api/render

Render an STL from one view, or render all six views into a ZIP archive. Files are processed in memory and are not retained.

curl -fsS \
  -F [email protected] \
  "http://localhost:5000/api/render?view=front&width=1024&height=768" \
  -o front.png
ParameterDefaultAccepted values
viewfrontfront, back, left, right, top, bottom, or all
width1024128 to 2048 pixels
height768128 to 2048 pixels
color4fb3ffSix hexadecimal digits, with or without #
background161a20Six hexadecimal digits, with or without #

One view returns 200 OK with image/png. Set view=all to receive application/zip containing front.png, back.png, left.png, right.png, top.png, and bottom.png.

curl -fsS \
  -F [email protected] \
  "http://localhost:5000/api/render?view=all" \
  -o stl-views.zip

Behavior and errors

Uploads must have an .stl filename. There is no application-level file-size or triangle-count limit. At most two renders run concurrently; another render receives 503 Service Unavailable.

API failures return JSON with an appropriate HTTP status:

{"error":"The uploaded file is not a valid ASCII or binary STL."}
StatusMeaning
400Missing or invalid multipart data, parameter, or file field
405HTTP method is not supported by the endpoint
415Filename does not end in .stl
422STL data cannot be parsed or rendered
500Rendering failed on the server
503Both render workers are busy

Privacy

API uploads are processed temporarily to produce the requested output. The application does not save the STL or its model metadata. The browser viewer remains fully local and does not use this endpoint.