{
  "openapi": "3.0.1",
  "info": {
    "title": "3D Model Renderer: STL, 3MF, OBJ, GLB & OpenSCAD to PNG",
    "description": "Render STL, 3MF, OBJ, GLB/glTF, PLY and OpenSCAD models to PNG images, four-view sheets and turntable GIF or MP4, measure size, volume and watertightness, and convert between STL, 3MF, OBJ and GLB. OpenSCAD errors come back with line numbers for people and AI agents.",
    "version": "0.1",
    "x-build-id": "FjsXHA30AFn5Xkk00"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/jumblemog~3d-model-renderer/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-jumblemog-3d-model-renderer",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/acts/jumblemog~3d-model-renderer/runs": {
      "post": {
        "operationId": "runs-sync-jumblemog-3d-model-renderer",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor and returns information about the initiated run in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/runsResponseSchema"
                }
              }
            }
          }
        }
      }
    },
    "/acts/jumblemog~3d-model-renderer/run-sync": {
      "post": {
        "operationId": "run-sync-jumblemog-3d-model-renderer",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "inputSchema": {
        "type": "object",
        "properties": {
          "openscadCode": {
            "title": "OpenSCAD code",
            "type": "string",
            "description": "A 3D or 2D design in the OpenSCAD language. It is compiled with a current OpenSCAD (Manifold engine), with the BOSL2, MCAD, Round-Anything and threads.scad libraries available through include <...>. Errors and warnings come back with their line, and echo() output is returned too."
          },
          "modelUrls": {
            "title": "Links to models",
            "type": "array",
            "description": "Links to model files: .stl, .3mf, .obj, .glb, .gltf, .ply, .off or .scad, GitHub file pages, Google Drive or Dropbox share links, or ZIP archives. An archive with an OpenSCAD file renders that design (its other files can be included); otherwise every model in it is rendered.",
            "items": {
              "type": "string"
            }
          },
          "uploads": {
            "title": "Upload models",
            "type": "array",
            "description": "Upload model files or ZIP archives from your computer."
          },
          "outputs": {
            "title": "What to make",
            "type": "array",
            "description": "Files to make for each model. Empty: a PNG image, plus an STL file for OpenSCAD designs. Size, volume and other measurements always come in the results.",
            "items": {
              "type": "string",
              "enum": [
                "png",
                "sheet",
                "gif",
                "mp4",
                "stl",
                "3mf",
                "obj",
                "glb",
                "svg",
                "dxf",
                "pdf"
              ],
              "enumTitles": [
                "PNG image of each view",
                "Sheet of four views with the size (PNG)",
                "Turntable animation (GIF)",
                "Turntable video (MP4)",
                "STL file (3D printing)",
                "3MF file (3D printing, keeps colors)",
                "OBJ file",
                "GLB file (web, AR and game engines)",
                "SVG file (2D designs, laser cutting)",
                "DXF file (2D designs, CNC and laser cutting)",
                "PDF file (2D designs, printable at full size)"
              ]
            }
          },
          "parameters": {
            "title": "OpenSCAD variables",
            "type": "object",
            "description": "Set variables of an OpenSCAD design without editing it, like OpenSCAD's customizer: {\"width\": 40, \"label\": \"Hi\", \"holes\": true, \"size\": [10, 20, 5]}. Values can be numbers, text, true/false or lists."
          },
          "views": {
            "title": "Views",
            "type": "array",
            "description": "The angles to draw, one PNG image each. Iso views are perspective with a soft shadow; the others are orthographic, as in a technical drawing. Models are Z up with their front facing -Y, as in slicers.",
            "items": {
              "type": "string",
              "enum": [
                "iso",
                "iso-back",
                "front",
                "back",
                "left",
                "right",
                "top",
                "bottom"
              ],
              "enumTitles": [
                "Iso (front, right and top)",
                "Iso from the back",
                "Front",
                "Back",
                "Left",
                "Right",
                "Top",
                "Bottom"
              ]
            },
            "default": [
              "iso"
            ]
          },
          "imageSize": {
            "title": "Image size (pixels)",
            "minimum": 128,
            "maximum": 4096,
            "type": "integer",
            "description": "Width and height of the square images and of the four-view sheet.",
            "default": 1024
          },
          "color": {
            "title": "Model color",
            "pattern": "^#?([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$",
            "type": "string",
            "description": "Color for models (or parts) that have no color of their own, as a hex code such as #4a90d9 or #f28c28. Also the base color written into 3MF and GLB files.",
            "default": "#4a90d9"
          },
          "background": {
            "title": "Background",
            "type": "string",
            "description": "Background color as a hex code, or transparent for PNG images with a transparent background (sheets and animations then use white).",
            "default": "#ffffff"
          },
          "modelColors": {
            "title": "Keep the model's own colors",
            "type": "boolean",
            "description": "Draw colors and textures from the file: OpenSCAD color(), 3MF colors, glTF materials and textures, OBJ materials, PLY vertex colors. Off: everything in the model color.",
            "default": true
          },
          "edges": {
            "title": "Outline sharp edges",
            "type": "boolean",
            "description": "Draw thin lines along sharp edges and open borders, which makes mechanical parts easier to read, especially in front, side and top views.",
            "default": true
          },
          "shadow": {
            "title": "Soft shadow",
            "type": "boolean",
            "description": "A soft contact shadow under the model in iso views and animations.",
            "default": true
          },
          "projection": {
            "title": "Projection",
            "enum": [
              "auto",
              "perspective",
              "orthographic"
            ],
            "type": "string",
            "description": "How views are projected.",
            "default": "auto"
          },
          "animationSeconds": {
            "title": "Turntable length (seconds)",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "How long one turn of the GIF or MP4 turntable takes (24 frames per second; GIFs use every other frame). Turntables are charged per second, so 3 seconds counts as 3 turntable seconds.",
            "default": 3
          },
          "animationSize": {
            "title": "Turntable size (pixels)",
            "minimum": 128,
            "maximum": 1080,
            "type": "integer",
            "description": "Width and height of the GIF and MP4 turntables.",
            "default": 512
          },
          "upAxis": {
            "title": "Up axis of mesh files",
            "enum": [
              "auto",
              "z",
              "y"
            ],
            "type": "string",
            "description": "Which axis points up in the files, so models stand upright. 3D printing formats are Z up; glTF is Y up by definition; OBJ files are usually Y up but CAD exports can be Z up.",
            "default": "auto"
          },
          "units": {
            "title": "Units of mesh files",
            "enum": [
              "auto",
              "mm",
              "cm",
              "m",
              "in"
            ],
            "type": "string",
            "description": "The unit of STL, OBJ, PLY, OFF and glTF coordinates, which those files don't record. Measurements are always reported in millimetres; converted files are written in millimetres (GLB in metres).",
            "default": "auto"
          },
          "materialDensity": {
            "title": "Material density (g/cm³)",
            "minimum": 0.05,
            "maximum": 25,
            "type": "number",
            "description": "Used for solidWeightGrams, the weight of the model printed solid: 1.24 for PLA, 1.04 for ABS, 1.27 for PETG, 1.21 for TPU, 1.1 for resin. Infill makes real prints lighter.",
            "default": 1.24
          },
          "inputFormat": {
            "title": "Input format",
            "enum": [
              "scad",
              "stl",
              "3mf",
              "obj",
              "glb",
              "gltf",
              "ply",
              "off"
            ],
            "type": "string",
            "description": "The format of linked or uploaded files, when it can't be told from the file name or contents. Empty: automatic."
          },
          "mainFile": {
            "title": "Main file in ZIP archives",
            "type": "string",
            "description": "The model to render inside a ZIP archive, such as box.scad or parts/lid.stl. Empty: the OpenSCAD file nearest the top of the archive, or else every model in it."
          },
          "models": {
            "title": "More models (batch)",
            "type": "array",
            "description": "A list of models to render in the same run. Each entry is OpenSCAD code, or an object with openscadCode or url and optional name, parameters, inputFormat, mainFile, upAxis, units and color, for example the same design with different parameters: [{\"url\": \"https://example.com/box.scad\", \"name\": \"small\", \"parameters\": {\"width\": 30}}, {\"url\": \"https://example.com/box.scad\", \"name\": \"large\", \"parameters\": {\"width\": 80}}]."
          },
          "renderTimeoutSecs": {
            "title": "OpenSCAD time limit per model (seconds)",
            "minimum": 5,
            "maximum": 900,
            "type": "integer",
            "description": "Stop compiling an OpenSCAD design after this many seconds. Most designs take under a second; designs with minkowski() or many hull() calls take longer.",
            "default": 120
          },
          "maxModels": {
            "title": "Maximum models",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Stop after this many models, so the cost of a run stays predictable.",
            "default": 100
          }
        }
      },
      "runsResponseSchema": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "actId": {
                "type": "string"
              },
              "userId": {
                "type": "string"
              },
              "startedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "finishedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "status": {
                "type": "string",
                "example": "READY"
              },
              "meta": {
                "type": "object",
                "properties": {
                  "origin": {
                    "type": "string",
                    "example": "API"
                  },
                  "userAgent": {
                    "type": "string"
                  }
                }
              },
              "stats": {
                "type": "object",
                "properties": {
                  "inputBodyLen": {
                    "type": "integer",
                    "example": 2000
                  },
                  "rebootCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "restartCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "resurrectCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "computeUnits": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "options": {
                "type": "object",
                "properties": {
                  "build": {
                    "type": "string",
                    "example": "latest"
                  },
                  "timeoutSecs": {
                    "type": "integer",
                    "example": 300
                  },
                  "memoryMbytes": {
                    "type": "integer",
                    "example": 1024
                  },
                  "diskMbytes": {
                    "type": "integer",
                    "example": 2048
                  }
                }
              },
              "buildId": {
                "type": "string"
              },
              "defaultKeyValueStoreId": {
                "type": "string"
              },
              "defaultDatasetId": {
                "type": "string"
              },
              "defaultRequestQueueId": {
                "type": "string"
              },
              "buildNumber": {
                "type": "string",
                "example": "1.0.0"
              },
              "containerUrl": {
                "type": "string"
              },
              "usage": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "integer",
                    "example": 1
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "usageTotalUsd": {
                "type": "number",
                "example": 0.00005
              },
              "usageUsd": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "number",
                    "example": 0.00005
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}