Skip to main content
POST
Create a scene from a custom panorama
Like Create Scene with panoramaUri, but you also say where the panorama was captured in your own world: panoramaC2w is its camera pose and metersPerUnit the scale between the scene model’s frame and yours. Every camera in the result — the batch views now, and the new views you generate later — comes back in your world frame, so the scene lines up with your existing content. The task is a pano task: Get Scene Task reports operation: "pano" and returns the same result.
Pricing: scene tasks don’t currently consume credits.

Request parameters

Send application/json, up to 1 MiB. Unknown fields are rejected. prompt, referenceImages, and quality are not accepted here.

Coordinate frame

panoramaC2w is a 4 × 4 camera-to-world matrix, written as four rows:
  • The last row must be [0, 0, 0, 1].
  • The upper-left 3 × 3 rotation must be orthonormal (no scaling or shear) and a proper rotation (determinant +1, no mirroring), within a tolerance of 1e-4.
  • The translation (the first three values of the fourth column) is the panorama’s position in your world, in your units.
  • The scene must fit the range an .spz can store: the largest absolute translation component plus 25 × metersPerUnit (the scene’s radius) must be below 4000.
A point p in the scene model’s frame lands at R · (metersPerUnit · p) + t in yours, where R and t are the rotation and translation of panoramaC2w. The cameras in the result are converted the same way.

Response parameters

Returns 200 OK with a Scene Task in processing state, operation set to pano:

Common errors

Examples

A panorama captured 1.5 units above the origin, turned 90° about the y axis, at the default scale:
Poll it with Get Scene Task, then continue the session with Generate Scene Views and Reconstruct Scene.

Authorizations

Authorization
string
header
required

Server-side SDK clients use a project API key. Remote MCP clients use an OAuth access token. Never expose a project API key in browser code.

Headers

X-Request-Id
string

Optional caller-supplied correlation ID, up to 128 characters. The service returns the effective value in the response header for tracing and support.

Required string length: 1 - 128
X-Viggle-Source
string

Optional source-channel label, up to 128 characters, used to attribute traffic to an SDK, integration, product surface, or internal workflow.

Required string length: 1 - 128

Body

application/json

Body of POST /v1/scenes/custom-pano. The panorama is placed at panoramaC2w in the caller's world: a model-frame point p lands at R · (metersPerUnit · p) + t. The rotation must be orthonormal and not mirrored (tolerance 1e-4), and the largest absolute translation component plus 25 × metersPerUnit must be below 4000.

sessionId
string
required

Session chosen by the caller, scoped to the caller's account. A session holds one scene and its image batches, and runs one task at a time: a submission while a task is still processing answers 409 with that task in error.details.running_task_id.

Required string length: 1 - 128
Pattern: ^[A-Za-z0-9_-]+$
Example:

"living-room-01"

panoramaUri
string<uri>
required

URL of the 360° panorama.

panoramaC2w
number[][]
required

4 × 4 camera-to-world matrix as four rows of four finite numbers; the last row must be [0, 0, 0, 1].

Required array length: 4 elements
Required array length: 4 elements
Example:
metersPerUnit
number
default:1

Scale applied to model-frame positions before panoramaC2w.

Required range: x >= 0.05
spzOutputUrl
string<uri>

Same as outputUris.spz.

outputUris
object

The caller's own upload URLs; Viggle PUTs each finished file to its URL. Null entries are ignored. An .spz sent here is not kept by Viggle, and the result's spz.url is this URL; a preview or panorama sent here is also kept, and the result links to Viggle's copy. Each URL must be http(s), without credentials, on a host that resolves only to public addresses.

Response

Scene task started.

A scene task (scn_ prefix), returned by every /v1/scenes submission and by GET /v1/scenes/{task_id}. ready, failed, and cancelled are terminal. A task stays readable for about 72 hours after it finishes.

id
string
required

Task ID, scn_{runId}.{sessionId}.

sessionId
string
required
operation
enum<string>
required

A custom-pano task reports pano.

Available options:
pano,
generate,
reconstruct
status
enum<string>
required
Available options:
processing,
ready,
failed,
cancelled
createdAt
integer<int64> | null
required

Start time, Unix milliseconds.

completedAt
integer<int64> | null
required

End time, Unix milliseconds; null while processing.

result
object | null
required

Set only when ready.

error
object | null
required

Set only when failed. code is INVALID_REQUEST (not retryable — the model rejected the input, such as a batch from another session) or PROCESSING_FAILED (retryable).