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_IDProvision 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, immutableUse image/webp for cell files. Send the Cache-Control header exactly as
shown because it is part of the signed upload request.
Resume after a failed upload
If a PUT fails partway through, request fresh URLs for the folder you already
started instead of a new one. Send the same files plus the folderKey from
the first response:
JSON
{
"folderKey": "splats/external-user/lod-.../",
"files": [ ... ]
}The response carries the same folderKey and manifestUrl with new
uploadUrls. Files you already uploaded are kept; upload the rest. A folder
can only be resumed until a Scene is created from it.
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
| Status | Cause |
|---|---|
| 400 | Missing external user, invalid JSON, unsafe or duplicate path, missing manifest, or size limit |
| 400 | INVALID_S3_KEY: folderKey is not a folder this endpoint issued |
| 401 | Missing or invalid Bearer / public-key combination, including an inactive or unknown external user |
| 403 | The integration owner's plan does not include REST API access |
| 403 | S3_KEY_FORBIDDEN: folderKey belongs to a different external user |
| 409 | LOD_FOLDER_COMMITTED: a Scene already uses folderKey; start a new folder |
| 500 | Moshpit could not create the signed upload URLs |