.spz format — from a text prompt or a 360° panorama. This guide runs the whole loop:
- Create a scene from a prompt with
POST /v1/scenes/pano. You get the.spz, the generated panorama, and aninitialbatch of posed images. - Generate new images from a camera you choose with
POST /v1/scenes/generate. They become ageneratedbatch. - Reconstruct the scene from both batches with
POST /v1/scenes/reconstruct, for an updated.spz.
scn_ task ID, and you poll GET /v1/scenes/{task_id} until it’s ready.
Set VIGGLE_API_KEY and run the example below as-is — it needs no other input.
What you need
- An API key from the Viggle Dashboard, exported as
VIGGLE_API_KEY - A text prompt, up to 1000 characters — or a public URL of a 360° panorama
- Credits: none — scene tasks don’t currently consume credits
Key ideas
- Session. Every request carries a
sessionIdyou choose (1–128 letters, digits,_, or-). A session holds one scene and its image batches, and runs one task at a time — wait for a task to finish before submitting the next one in the same session. - Batch. A set of posed images in a session.
panomakes theinitialbatch, eachgeneratemakes ageneratedone. TheirbatchIds are whatgenerateandreconstructtake inreferenceBatchIds. - Camera. Poses are 4 × 4 camera-to-world matrices (
c2w) in the scene’s frame. Every image in a batch comes with itsc2w, so the simplest way to pick a new camera is to move an existing one.
Build, extend, and reconstruct
The script creates a scene, savesscene.spz and panorama.png, generates new views from a camera moved 0.3 units sideways from the first view, then reconstructs and saves scene-v2.spz.
scene.spz and scene-v2.spz in any viewer that reads SPZ Gaussian splats.
Responses
Every submission answers immediately with aprocessing task:
GET /v1/scenes/{task_id} until status is ready, failed, or cancelled. What a ready result holds depends on the operation:
Each
outputBatch.views[] entry has the image url, its camera c2w, and intrinsic. Signed URLs last 3 hours — fetch the task again for fresh ones — and a task stays readable for about 72 hours after it finishes. See Get Scene Task for every field.
Start from your own panorama
Replaceprompt with panoramaUri in step 1:
POST /v1/scenes/custom-pano with panoramaC2w and metersPerUnit.
Save results to your own storage
AddspzOutputUrl — or outputUris with spz, preview, or panorama — to any request, and Viggle uploads those files to your URLs with PUT. Presigned S3, R2, or GCS upload URLs work. An .spz sent to your URL isn’t kept by Viggle; the result’s spz.url is then your URL. See Upload to your own storage.
If something fails
409on submit: the session already has a task running.error.details.running_task_idnames it; wait for it, then submit again.- Task
failedwithINVALID_REQUEST: the model rejected the input, for example a batch from another session. Fix it before retrying. - Task
failedwithPROCESSING_FAILED, orcancelled: submit the same request again. 404on poll: wrong task ID, a task from another account, or past the 72-hour retention.
Create Scene
Prompt, panorama, reference images, and quality.
Generate Scene Views
Cameras, projection, field of view, and seed.
Reconstruct Scene
Rebuild the
.spz from your batches.Get Scene Task
The task object, result fields, and errors.

