API Reference

/

POST /v1/uploads/lod-folder

POST /api/v1/uploads/lod-folder

Create short-lived signed upload URLs for a generated LOD folder. The folder must contain lod-meta.json at its root and at least one .webp cell file.

POST

https://moshpit.studio/api/v1/uploads/lod-folder

Auth

All three headers are required:

Authorization: Bearer msk_YOUR_SECRET_KEY
X-Moshpit-Public-Key: mpk_YOUR_PUBLIC_KEY
X-Moshpit-External-User-Id: YOUR_HOST_USER_ID

Provision the external user first with PUT /api/v1/external-user.

REST API access

REST API access is included on Free, Pro, and Enterprise. Storage, Scene counts, and integration limits still apply.

Body

List every file before uploading any bytes:

{}

JSON

{
  "files": [
    {
      "relativePath": "lod-meta.json",
      "contentType": "application/json",
      "fileSize": 2841
    },
    {
      "relativePath": "level-0/cell-0.webp",
      "contentType": "image/webp",
      "fileSize": 4194304
    }
  ]
}

files must contain between 2 and 20,000 entries. Each file may be at most 50 MiB, and the full folder may be at most 10 GiB. Account storage limits still apply when saving the Scene. relativePath may contain letters, numbers, ., _, -, and /. Absolute paths and .. segments are rejected.

Success response

{}

JSON

{
  "status": "success",
  "folderKey": "splats/external-user/lod-.../",
  "manifestUrl": "https://cdn.example.com/splats/external-user/lod-.../lod-meta.json",
  "uploads": [
    {
      "relativePath": "lod-meta.json",
      "uploadUrl": "https://...",
      "key": "splats/external-user/lod-.../lod-meta.json"
    },
    {
      "relativePath": "level-0/cell-0.webp",
      "uploadUrl": "https://...",
      "key": "splats/external-user/lod-.../level-0/cell-0.webp"
    }
  ],
  "expiresAt": "2026-05-20T13:00:00.000Z"
}

Upload each file to its matching uploadUrl within one hour:

PUT {uploadUrl}
Content-Type: application/json
Cache-Control: public, max-age=31536000, immutable

Use image/webp for cell files. Send the Cache-Control header exactly as shown because it is part of the signed upload request.

After every upload succeeds, call POST /api/v1/splats with:

{}

JSON

{
  "title": "Lobby scan",
  "splatType": "lod",
  "splatUrl": "{manifestUrl}",
  "lodFolderKey": "{folderKey}"
}

The manifestUrl and folderKey must come from the same response and the same external user.

Error responses

StatusCause
400Missing external user, invalid JSON, unsafe or duplicate path, missing manifest, or size limit
401Missing or invalid Bearer / public-key combination, including an inactive or unknown external user
403The integration owner's plan does not include REST API access
500Moshpit could not create the signed upload URLs