Verse API — Quickstart
Everything Verse does is a plain HTTP API — the web app, the embed SDK and the Blender, Unity and Unreal plug-ins are all clients of the same endpoints. Anything that can send an HTTP request (a game-engine plugin, a Blender add-on, a CI pipeline, curl) can turn a 3D file into a signed, streamed share link.
- Base URL:
https://verse.ctruh.com(self-hosted: your origin) - Postman collection: /verse-api.postman_collection.json — import and try every call
- Full reference: docs/api.md · Embed SDK: docs/embed-sdk.md · JS/TS client: docs/sdk.md (
npm install @ctruhtech/verse-sdk, or load/sdk/verse-sdk.js)
Authentication
Sign up free, then upload. On https://verse.ctruh.com every upload needs
an account: sign up at /signin with your email (a
6-digit code, no password), copy your account token from Studio (or create an
API key on the Account page), and send it
as Authorization: Bearer <token> on every upload call. An unsigned upload
answers 401 with { "code": "signin_required", "signup_url": … } and a
plain-language error. Opening or embedding a published link never needs an
account.
Plug-ins and CLIs can skip the copy-paste: POST /v1/auth/device, open the
returned verify_url, sign in there, and poll /v1/auth/device/token
(plug-in sign-in).
Limits on the hosted service: 100 uploads per hour per account; files
over 500 MB also count against an hourly cap by plan (2 on Free, 5 on
Starter, 10 on Pro, 25 on Scale). Files up to your plan's limit (100 MB on
Free, 2 GB Starter, 10 GB Pro, 20 GB Scale) go up through the resumable
upload above 64 MB and are prepared on arrival.
GET /v1/limits returns the live numbers (maxUploadMB, oneShotMaxMB,
resumableAboveMB, uploadsPerHour, largeUploadsPerHour).
The core flow: file in → share link out
Set two variables first:
BASE=https://verse.ctruh.com
TOKEN=<your account token or API key>1. Upload — POST the raw bytes (no multipart):
curl -sS -X POST "$BASE/v1/ingest" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: model/gltf-binary" \
-H "X-Verse-Name: my-apartment" \
--data-binary @scene.glb
# → 202 {"job":"my-apartment-1a2b3c4d5e6f"}Accepted inputs, auto-detected by magic bytes:
| You send | Detected as | Compiles to |
|---|---|---|
.glb (binary glTF; Draco + KTX2 supported) | mesh scene | streamed .vpk |
.ply or .splat (Gaussian-splat capture) | splat | streamed .vsp |
.ply (points), .las / .laz, .e57, .xyz / .pts | point cloud | streamed point cloud |
.ifc, .usdz / .usd*, .fbx, .obj (alone or zipped with textures), PLY mesh | converted to GLB on the server | streamed .vpk |
a LiDAR or camera capture, a 3D tour export bundle's .zip | scan (cleaned up first) | Fidelity or streamed — see Import a scan |
A PDF or an HTML page is refused at once with 400 and the reason
(unsupported file type); a floor plan goes to
Verse Home instead.
Force the kind for headerless formats with X-Verse-Kind (splat, cloud,
ifc, usd, fbx, obj, ply); the full header list (bake, Fidelity
path, look, scan, up axis, units) is in
POST /v1/ingest.
X-Verse-Name is optional (lowercase letters, digits, -, _); it prefixes the id.
One-shot POST /v1/ingest: Max body: 512 MB on a self-hosted server by default; the hosted service caps it at 95 MB (oneShotMaxMB in GET /v1/limits). Anything over 64 MB should go through the resumable upload, up to your plan's limit: 100 MB Free, 2 GB Starter, 10 GB Pro, 20 GB Scale.
2. Poll the job until done (the time grows with the file size; the
record carries a live stage and estimateS so you can show honest progress):
curl -sS "$BASE/v1/ingest/my-apartment-1a2b3c4d5e6f"{
"status": "done",
"url": "https://…/?vpk=ingest/my-apartment-1a2b3c4d5e6f.vpk",
"vpkUrl": "https://…/ingest/my-apartment-1a2b3c4d5e6f.vpk",
"stats": { "tris": 182340 },
"signed": true
}While compiling you get {"status":"compiling","stage":"…","estimateS":…};
on failure {"status":"error","error":"…","errorInfo":{…}}. Splat jobs return vspUrl and
stats: {splats, chunks} instead. signed: true means the artifact carries an
Ed25519 signature the browser verifies against /v1/pubkey.
3. Share. url is the ready-to-open link; send it as it is. Its
parameter depends on what was built: ?vpk= for a streamed scene, ?glb=
for a Fidelity product, ?model= for a splat,
point cloud or compatibility-mode build. Embed it with the SDK
(docs/embed-sdk.md) or an iframe. Scenes uploaded with an
account are kept (Retention).
Publishing extras
| Endpoint | Body | Returns |
|---|---|---|
POST /v1/experience | JSON {scene, …} per experience-format, ≤128 KB | {path, url} — a ?experience= link |
POST /v1/tour | JSON {scene, samples:[[t,x,y,z,fx,fy,fz]×2..6000]}, ≤512 KB | {path, url} — a ?tour= link |
POST /v1/poster | raw PNG, ≤4 MB | {path, url} — a poster image URL |
Live presence (shared tours)
GET /v1/room/<id>/events— Server-Sent Events roster stream (id=[A-Za-z0-9_-]{1,64}).POST /v1/room/<id>/pose— JSON{id, name, color:"#rrggbb", pose:[x,y,z,fx,fy,fz]}≤2 KB, ~8 Hz. Up to 32 people per room. Anyone with the room id can join, so treat room ids like private links.
Large files: resumable upload
Above 64 MB (resumableAboveMB), use the resumable flow so an edge hiccup resumes instead of
restarting. Every call carries the same Authorization: Bearer $TOKEN header as the
one-shot upload: POST /v1/ingest/begin {size, name} → {uploadId}, ordered
PUT /v1/ingest/part/<uploadId> with Content-Range (16 MB parts work well; any
part size is accepted as long as the parts are sent in order), then
POST /v1/ingest/commit/<uploadId> → the same 202 {job}. An out-of-order
part answers 409 with the server's received offset to resume from.
Details: Resumable uploads.
Own, protect, review
POST /v1/account {name}→ a token (shown once) that owns what you upload withAuthorization: Bearer <token>: permanent scenes,/studio, analytics.PATCH /v1/scenes/<id> {"visibility":"private"}+POST /v1/scenes/<id>/share→ per-recipient share tokens;?share=<token>on the link. Guide.POST /v1/review/<id> {pos, text}/GET /v1/review/<id>— comments pinned in 3D on the shared scene. Guide.
Errors
Every error the app generates is JSON {"error":"…"} with a real status
and the header X-Verse-Error: 1: 401 unknown key, 404 unknown job,
409 out-of-order part, 413 body too large, 429 rate/quota, 503 compile
queue full, 507 storage full. An error without the header came from the
network edge, not the app — that one is worth a retry. Back off on 429/503;
re-upload on error. Full rule: Error contract.
Building a plug-in
An exporter needs exactly three calls: export the scene to GLB, POST
/v1/ingest (or the resumable trio), poll GET /v1/ingest/<job>, then hand
the user the url. The Verse plug-ins for Blender, Unity and Unreal on the
Downloads page do exactly this; their server URL is
configurable, so they work against the hosted service or your own origin.
Questions about the API or a plug-in: integrations@ctruh.com.