Skip to main content
POST
Create a scene from a custom panorama
Like Create Scene with panoramaUri or an uploaded panorama file, 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 (1 credit = $0.01): 1 credit ($0.01) per view, and the panorama counts as 6 views — 6 credits ($0.06) per task, reserved when it is submitted and refunded in full unless it finishes ready. See Pricing.

Request parameters

Send application/json, up to 1 MiB, or multipart/form-data to upload the panorama file itself — see Upload a panorama file. Unknown fields are rejected. prompt, referenceImages, and quality are not accepted here.

Upload a panorama file

Send the request as multipart/form-data with the image in a panorama file field, under the same rules as Create Scene:
  • The other fields are the same as in the JSON body, each sent once. sessionId is plain text; panoramaC2w and metersPerUnit carry their JSON value as text, for example panoramaC2w=[[1,0,0,0],[0,1,0,1.5],[0,0,1,0],[0,0,0,1]].
  • Send at most one file, named panorama: 1 byte to 50 MiB, a JPEG, PNG, or WebP image as detected from its bytes.
  • The file takes the place of panoramaUri; sending both is rejected.
  • It is priced the same as a scene from panoramaUri.

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 queued (or already processing) Scene Task, 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:
The same request with a local panorama file, as multipart/form-data:
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

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

Response

Scene task started.

A scene task (scn_ prefix), returned by every /v1/scenes submission and by GET /v1/scenes/{task_id}. It starts queued (or processing when a GPU slot is free); ready, failed, and cancelled are terminal. Only a ready task keeps its credits. 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:
queued,
processing,
ready,
failed,
cancelled
credits
number
required

Credits this task is charged: reserved at submission (1 per view the run handles, with a panorama counting as 6) and 0 once a task that did not finish ready is refunded.

Required range: x >= 0
createdAt
integer<int64> | null
required

Start time, Unix milliseconds.

completedAt
integer<int64> | null
required

End time, Unix milliseconds; null while queued or 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).

queuePosition
integer

Only while queued: tasks waiting ahead of this one, 0 when it is next.

Required range: x >= 0