{
  "openapi": "3.0.1",
  "info": {
    "title": "3D mesh decimation with measured quality loss (Blender)",
    "description": "Reduce polygon count on glTF/GLB and FBX, and see what it cost: silhouette deviation measured both ways, UV integrity (islands, overlap, texel density), skin-weight survival. Outputs GLB, FBX, USD, USDZ. For Unreal, Unity, three.js and AR pipelines needing LODs without eyeballing each asset.",
    "version": "0.1",
    "x-build-id": "tAUes5nMqPxNRBinT"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/ernestx~mesh-decimate-qc/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-ernestx-mesh-decimate-qc",
        "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/ernestx~mesh-decimate-qc/runs": {
      "post": {
        "operationId": "runs-sync-ernestx-mesh-decimate-qc",
        "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/ernestx~mesh-decimate-qc/run-sync": {
      "post": {
        "operationId": "run-sync-ernestx-mesh-decimate-qc",
        "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",
        "required": [
          "glbUrl"
        ],
        "properties": {
          "glbUrl": {
            "title": "Source model URL (glTF/GLB or FBX)",
            "type": "string",
            "description": "Publicly reachable URL to a .glb, .gltf with embedded buffers, or .fbx. The format is detected from the file header, not the extension. FBX referencing external texture files will not resolve them - use an FBX with embedded media."
          },
          "targetRatio": {
            "title": "Target ratio of triangles to keep",
            "type": "string",
            "description": "Fraction of the original triangle count to keep, between 0 and 1. 0.5 halves the mesh, 0.1 keeps a tenth. Ignored when targetTriangles is set.",
            "default": "0.5"
          },
          "targetTriangles": {
            "title": "Target triangle count",
            "minimum": 0,
            "type": "integer",
            "description": "Absolute triangle budget for the whole asset. Overrides targetRatio when greater than 0. Use this for LOD tiers with a fixed budget.",
            "default": 0
          },
          "method": {
            "title": "Reduction method",
            "enum": [
              "collapse",
              "planar",
              "unsubdivide"
            ],
            "type": "string",
            "description": "collapse is the general-purpose edge-collapse decimator and the right default. planar merges coplanar faces only, which is ideal for hard-surface and architectural meshes because it removes no silhouette detail at all. unsubdivide reverses one subdivision level on cleanly subdivided quad meshes.",
            "default": "collapse"
          },
          "planarAngle": {
            "title": "Planar angle limit (degrees)",
            "type": "string",
            "description": "Only used by the planar method: faces meeting at less than this angle are merged. 1-5 degrees is conservative, 15+ starts flattening curvature.",
            "default": "5.0"
          },
          "preserveUvSeams": {
            "title": "Protect UV seams",
            "type": "boolean",
            "description": "Stops collapses from crossing UV island borders. Leave on unless the asset is untextured: a decimator that welds across a seam shreds the texture mapping, and no triangle count is worth that.",
            "default": true
          },
          "preserveBoundaries": {
            "title": "Protect sharp edges and open borders",
            "type": "boolean",
            "description": "Keeps hard edges and open mesh borders from being collapsed. Costs some reduction on the target, which the report tells you about.",
            "default": true
          },
          "cleanupFirst": {
            "title": "Clean up before reducing",
            "type": "boolean",
            "description": "Merges coincident vertices and dissolves zero-area faces first. Recommended: decimating a mesh that still carries duplicate vertices spends the budget collapsing edges that should never have existed.",
            "default": true
          },
          "outputFormat": {
            "title": "Output format",
            "enum": [
              "glb",
              "fbx",
              "usdc",
              "usda",
              "usd",
              "usdz"
            ],
            "type": "string",
            "description": "FBX is written with studio-fidelity settings rather than Blender's defaults: smoothing groups on, tangents exported, custom properties kept, no invented leaf bones, animation curves unsimplified, and every take in the one file. GLB for web and engine ingest, USD for Omniverse, USDZ for AR.",
            "default": "glb"
          },
          "textureFormat": {
            "title": "Texture handling on export",
            "enum": [
              "smart",
              "AUTO",
              "JPEG",
              "WEBP",
              "keep"
            ],
            "type": "string",
            "description": "Blender re-encodes embedded textures on export, and on a textured asset that dominates the file: leaving it on AUTO can more than DOUBLE the size even after the mesh was halved. Smart inspects the materials and picks JPEG when nothing relies on transparency, which on a typical PBR asset cuts the file by ~2/3.",
            "default": "smart"
          },
          "imageQuality": {
            "title": "Texture quality (JPEG/WEBP)",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "1-100. Only applies when textures are re-encoded. 85 is a good default; below 70 shows artifacts on normal maps.",
            "default": 85
          },
          "dracoCompression": {
            "title": "Draco mesh compression (GLB only)",
            "type": "boolean",
            "description": "Compresses vertex data inside the GLB, often shrinking geometry several times over on top of the polygon reduction. The viewer must support Draco - three.js and most web engines do, some DCC importers do not.",
            "default": false
          },
          "shapeKeyPolicy": {
            "title": "Meshes with morph targets (shape keys)",
            "enum": [
              "reject",
              "strip"
            ],
            "type": "string",
            "description": "Blender cannot apply a decimate modifier to a mesh carrying morph targets, so a facial-animation character would come back completely unreduced while the run looked successful. Reject refuses the asset and charges nothing. Strip drops the morph targets on purpose - only pick it if you know the blendshapes are expendable.",
            "default": "reject"
          }
        }
      },
      "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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}