.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} while it’s queued or processing, 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 360° panorama, as a public URL or an image file
- Credits: 1 credit ($0.01) per view, each time the model runs; a panorama counts as 6 views. The example below builds a scene from a prompt (6 views), generates one perspective view (1), and reconstructs from both batches (7), for 14 credits ($0.14). A task that doesn’t finish
readyis refunded in full.
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.generatealso takes the camera astargetPosition— a position plus yaw and pitch in degrees — instead of a matrix.
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 aqueued task — or processing, if a GPU slot was free. credits is what it reserved, and queuePosition how many tasks are ahead of it:
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:
multipart/form-data with a panorama file:
POST /v1/scenes/custom-pano with panoramaC2w and metersPerUnit.
Place the camera by position and angles
Instead of editing ac2w matrix in step 2, you can give generate a targetPosition: a position and a yaw and pitch in degrees. Positive yaw turns left and positive pitch looks up; with both 0 the camera looks down −Z.
targetC2w or targetPosition, not both. See Target position.
If something fails
402on submit: the balance can’t cover the task — 1 credit per view it runs on, 6 for a panorama. Top up and submit again.409on submit: the session already has a task running.error.details.running_task_idnames it; wait for it, then submit again.- Task
failedorcancelled: its credits are refunded in full; resubmitting reserves them 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.

