{
  "openapi": "3.0.1",
  "info": {
    "title": "GLB to USDZ Converter - AR Quick Look Ready (API)",
    "description": "Convert GLB/glTF to USDZ via API - no Mac, no Xcode. Every file is validated against Apple's ARKit rules and shipped with a QC report: correct PBR materials, Draco/KTX2 support, batch mode, previews, n8n & MCP ready. Fair billing: no valid file, no conversion charge.",
    "version": "1.2",
    "x-build-id": "qRAupY2T18fx5G1aD"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/sergeyfaraday~glb-to-usdz/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-sergeyfaraday-glb-to-usdz",
        "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/sergeyfaraday~glb-to-usdz/runs": {
      "post": {
        "operationId": "runs-sync-sergeyfaraday-glb-to-usdz",
        "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/sergeyfaraday~glb-to-usdz/run-sync": {
      "post": {
        "operationId": "run-sync-sergeyfaraday-glb-to-usdz",
        "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": {
          "uploadedModels": {
            "title": "Upload your model(s)",
            "type": "array",
            "description": "Drop **.glb**, **.gltf**, or **.zip** (multi-file glTF set) straight from your computer. **One-time setup:** in the upload dialog choose **New permanent storage** and name it (e.g. `glb-uploads`); from then on pick **Existing storage -> glb-uploads** every time, and select the same `glb-uploads` in the field right below. The Actor runs with limited permissions and can only read stores you grant this way. The .usdz lands in the run's **Storage -> Key-value store**."
          },
          "uploadStore": {
            "title": "Grant access to the upload store",
            "type": "string",
            "description": "Pick the storage your upload went into (by name from the list). Without this grant, uploaded files fail with UPLOAD_NOT_READABLE naming the store to pick. Pipelines can also use this store as an input source - list the records under Advanced -> Records inside the granted store. (API name until 1.2: sourceKeyValueStore - still accepted.)"
          },
          "source": {
            "title": "...or model URL(s)",
            "maxItems": 200,
            "type": "array",
            "description": "Direct link(s) to .glb / .gltf / .zip files. Up to 200 per run (batch). The prefill is a public Khronos sample - replace it with your own.",
            "items": {
              "type": "string"
            }
          },
          "targetHeight": {
            "title": "Target height in AR",
            "minimum": 0.001,
            "type": "number",
            "description": "Type the real-world height and pick the unit right below: **1.5 m** for a person-sized figure, **30 cm** for a toy, **8 cm** for a mug. The converter measures the model and scales it to match. Leave empty to keep the size as authored (with a warning if it looks off)."
          },
          "targetHeightUnit": {
            "title": "Unit of the height above",
            "enum": [
              "m",
              "cm",
              "mm",
              "inches",
              "feet"
            ],
            "type": "string",
            "description": "The unit for the number in Target height. Ignored when Target height is empty.",
            "default": "m"
          },
          "textureMaxSize": {
            "title": "Max texture size",
            "enum": [
              "1024",
              "2048",
              "4096"
            ],
            "type": "string",
            "description": "Longest side. Textures above this are resized. Apple recommends 2048 or less for smooth AR Quick Look.",
            "default": "2048"
          },
          "textureFormat": {
            "title": "Texture output format",
            "enum": [
              "auto",
              "png",
              "jpeg"
            ],
            "type": "string",
            "description": "USDZ accepts only PNG/JPEG; KTX2/Basis/WebP inputs are transcoded automatically. Data textures (normal, metallic, roughness, occlusion) always stay PNG.",
            "default": "auto"
          },
          "alphaHandling": {
            "title": "Transparency",
            "enum": [
              "preserve",
              "forceOpaque"
            ],
            "type": "string",
            "description": "If glass/foliage renders oddly on device, try force opaque.",
            "default": "preserve"
          },
          "animation": {
            "title": "Transform animations",
            "enum": [
              "preserve",
              "strip"
            ],
            "type": "string",
            "description": "Applies to translation/rotation/scale clips. Skeletal rigs are converted at bind pose and morph targets are removed (AR Quick Look doesn't support them) - always with an explicit warning in the report.",
            "default": "preserve"
          },
          "mode": {
            "title": "What to produce",
            "enum": [
              "convert",
              "reportOnly",
              "validateOnly"
            ],
            "type": "string",
            "description": "\"Validate\" mode accepts .usdz files as input (URL, upload, or store record) and answers: will this open correctly in AR Quick Look?",
            "default": "convert"
          },
          "failOn": {
            "title": "Deliver the USDZ when the ARKit gate finds...",
            "enum": [
              "error",
              "warning",
              "never"
            ],
            "type": "string",
            "description": "Every output is checked with Apple's ARKit compliance rules. This controls whether a non-compliant file is still delivered.",
            "default": "error"
          },
          "outputPreview": {
            "title": "Render a PNG preview ($)",
            "type": "boolean",
            "description": "**+$0.02 per image.** Flat 800x800 transparent render of the converted model so you can eyeball the result without an iPhone. A failed render never blocks your USDZ.",
            "default": false
          },
          "unitScale": {
            "title": "Raw unit scale",
            "type": "string",
            "description": "For scripts: \"auto\" (default; warns on suspicious size, never rescales silently), \"asIs\" (skip the sanity check), or a numeric factor like \"0.01\". Target height and Source units take precedence over this factor (with a warning).",
            "default": "auto"
          },
          "uploadRecords": {
            "title": "Records inside the granted store (pipelines)",
            "type": "array",
            "description": "Convert these records (by record name) from the store selected in \"Grant access to the upload store\". Not needed for uploads. (API name until 1.2: sourceKeys - still accepted.)",
            "items": {
              "type": "string"
            }
          },
          "sourceUnits": {
            "title": "Units the file was authored in (API/advanced)",
            "enum": [
              "mm",
              "cm",
              "m",
              "inches",
              "feet"
            ],
            "type": "string",
            "description": "Alternative to Target height for scripts: declare the export units (e.g. the DCC exported centimeters) to keep the authored size. If Target height is set, it wins and this is ignored with a warning."
          },
          "targetMaxFileSizeMB": {
            "title": "Warn when output exceeds (MB)",
            "type": "number",
            "description": "Emits TARGET_SIZE_EXCEEDED when the .usdz is larger than this; failOn decides delivery. Apple's practical guidance for web AR is 25 MB or less."
          },
          "webhookUrl": {
            "title": "Webhook URL",
            "type": "string",
            "description": "POST the batch summary JSON here when the run completes. Stored encrypted (webhook URLs often carry tokens); never shown in logs or on task pages."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}