curl --request POST \
--url https://apis.viggle.ai/v1/scenes/pano \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"sessionId": "living-room-01",
"prompt": "<string>",
"referenceImages": [
"<string>"
],
"quality": "low",
"panoramaUri": "<string>"
}
'import requests
url = "https://apis.viggle.ai/v1/scenes/pano"
payload = {
"sessionId": "living-room-01",
"prompt": "<string>",
"referenceImages": ["<string>"],
"quality": "low",
"panoramaUri": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
sessionId: 'living-room-01',
prompt: '<string>',
referenceImages: ['<string>'],
quality: 'low',
panoramaUri: '<string>'
})
};
fetch('https://apis.viggle.ai/v1/scenes/pano', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://apis.viggle.ai/v1/scenes/pano",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'sessionId' => 'living-room-01',
'prompt' => '<string>',
'referenceImages' => [
'<string>'
],
'quality' => 'low',
'panoramaUri' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://apis.viggle.ai/v1/scenes/pano"
payload := strings.NewReader("{\n \"sessionId\": \"living-room-01\",\n \"prompt\": \"<string>\",\n \"referenceImages\": [\n \"<string>\"\n ],\n \"quality\": \"low\",\n \"panoramaUri\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://apis.viggle.ai/v1/scenes/pano")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"sessionId\": \"living-room-01\",\n \"prompt\": \"<string>\",\n \"referenceImages\": [\n \"<string>\"\n ],\n \"quality\": \"low\",\n \"panoramaUri\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://apis.viggle.ai/v1/scenes/pano")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"sessionId\": \"living-room-01\",\n \"prompt\": \"<string>\",\n \"referenceImages\": [\n \"<string>\"\n ],\n \"quality\": \"low\",\n \"panoramaUri\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"sessionId": "<string>",
"operation": "pano",
"status": "queued",
"credits": 1,
"createdAt": 123,
"completedAt": 123,
"result": {
"operation": "pano",
"sessionId": "<string>",
"spz": {
"url": "<string>"
},
"preview": {
"url": "<string>"
},
"panorama": {
"url": "<string>"
},
"outputBatch": {
"batchId": "<string>",
"createdAt": 123,
"manifest": {
"url": "<string>"
},
"kind": "initial",
"views": [
{
"index": 1,
"url": "<string>",
"c2w": [
[
1,
0,
0,
0
],
[
0,
1,
0,
0
],
[
0,
0,
1,
0
],
[
0,
0,
0,
1
]
],
"intrinsic": [
123
]
}
]
},
"referenceViewCount": 123,
"newViewCount": 123,
"seconds": {}
},
"error": {
"code": "UNAUTHENTICATED",
"message": "<string>",
"retryable": true,
"request_id": "<string>",
"details": {},
"remediation": {
"action": "<string>",
"retry_after_ms": 1
}
},
"queuePosition": 1
}{
"error": {
"code": "UNAUTHENTICATED",
"message": "<string>",
"retryable": true,
"request_id": "<string>",
"details": {},
"remediation": {
"action": "<string>",
"retry_after_ms": 1
}
}
}{
"error": {
"code": "UNAUTHENTICATED",
"message": "<string>",
"retryable": true,
"request_id": "<string>",
"details": {},
"remediation": {
"action": "<string>",
"retry_after_ms": 1
}
}
}{
"error": {
"code": "UNAUTHENTICATED",
"message": "<string>",
"retryable": true,
"request_id": "<string>",
"details": {},
"remediation": {
"action": "<string>",
"retry_after_ms": 1
}
}
}{
"error": {
"code": "UNAUTHENTICATED",
"message": "<string>",
"retryable": true,
"request_id": "<string>",
"details": {},
"remediation": {
"action": "<string>",
"retry_after_ms": 1
}
}
}{
"error": {
"code": "UNAUTHENTICATED",
"message": "<string>",
"retryable": true,
"request_id": "<string>",
"details": {},
"remediation": {
"action": "<string>",
"retry_after_ms": 1
}
}
}{
"error": {
"code": "UNAUTHENTICATED",
"message": "<string>",
"retryable": true,
"request_id": "<string>",
"details": {},
"remediation": {
"action": "<string>",
"retry_after_ms": 1
}
}
}{
"error": {
"code": "UNAUTHENTICATED",
"message": "<string>",
"retryable": true,
"request_id": "<string>",
"details": {},
"remediation": {
"action": "<string>",
"retry_after_ms": 1
}
}
}Create Scene
Build a 3D Gaussian-splat scene from a text prompt or a 360° panorama.
curl --request POST \
--url https://apis.viggle.ai/v1/scenes/pano \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"sessionId": "living-room-01",
"prompt": "<string>",
"referenceImages": [
"<string>"
],
"quality": "low",
"panoramaUri": "<string>"
}
'import requests
url = "https://apis.viggle.ai/v1/scenes/pano"
payload = {
"sessionId": "living-room-01",
"prompt": "<string>",
"referenceImages": ["<string>"],
"quality": "low",
"panoramaUri": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
sessionId: 'living-room-01',
prompt: '<string>',
referenceImages: ['<string>'],
quality: 'low',
panoramaUri: '<string>'
})
};
fetch('https://apis.viggle.ai/v1/scenes/pano', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://apis.viggle.ai/v1/scenes/pano",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'sessionId' => 'living-room-01',
'prompt' => '<string>',
'referenceImages' => [
'<string>'
],
'quality' => 'low',
'panoramaUri' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://apis.viggle.ai/v1/scenes/pano"
payload := strings.NewReader("{\n \"sessionId\": \"living-room-01\",\n \"prompt\": \"<string>\",\n \"referenceImages\": [\n \"<string>\"\n ],\n \"quality\": \"low\",\n \"panoramaUri\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://apis.viggle.ai/v1/scenes/pano")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"sessionId\": \"living-room-01\",\n \"prompt\": \"<string>\",\n \"referenceImages\": [\n \"<string>\"\n ],\n \"quality\": \"low\",\n \"panoramaUri\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://apis.viggle.ai/v1/scenes/pano")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"sessionId\": \"living-room-01\",\n \"prompt\": \"<string>\",\n \"referenceImages\": [\n \"<string>\"\n ],\n \"quality\": \"low\",\n \"panoramaUri\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"sessionId": "<string>",
"operation": "pano",
"status": "queued",
"credits": 1,
"createdAt": 123,
"completedAt": 123,
"result": {
"operation": "pano",
"sessionId": "<string>",
"spz": {
"url": "<string>"
},
"preview": {
"url": "<string>"
},
"panorama": {
"url": "<string>"
},
"outputBatch": {
"batchId": "<string>",
"createdAt": 123,
"manifest": {
"url": "<string>"
},
"kind": "initial",
"views": [
{
"index": 1,
"url": "<string>",
"c2w": [
[
1,
0,
0,
0
],
[
0,
1,
0,
0
],
[
0,
0,
1,
0
],
[
0,
0,
0,
1
]
],
"intrinsic": [
123
]
}
]
},
"referenceViewCount": 123,
"newViewCount": 123,
"seconds": {}
},
"error": {
"code": "UNAUTHENTICATED",
"message": "<string>",
"retryable": true,
"request_id": "<string>",
"details": {},
"remediation": {
"action": "<string>",
"retry_after_ms": 1
}
},
"queuePosition": 1
}{
"error": {
"code": "UNAUTHENTICATED",
"message": "<string>",
"retryable": true,
"request_id": "<string>",
"details": {},
"remediation": {
"action": "<string>",
"retry_after_ms": 1
}
}
}{
"error": {
"code": "UNAUTHENTICATED",
"message": "<string>",
"retryable": true,
"request_id": "<string>",
"details": {},
"remediation": {
"action": "<string>",
"retry_after_ms": 1
}
}
}{
"error": {
"code": "UNAUTHENTICATED",
"message": "<string>",
"retryable": true,
"request_id": "<string>",
"details": {},
"remediation": {
"action": "<string>",
"retry_after_ms": 1
}
}
}{
"error": {
"code": "UNAUTHENTICATED",
"message": "<string>",
"retryable": true,
"request_id": "<string>",
"details": {},
"remediation": {
"action": "<string>",
"retry_after_ms": 1
}
}
}{
"error": {
"code": "UNAUTHENTICATED",
"message": "<string>",
"retryable": true,
"request_id": "<string>",
"details": {},
"remediation": {
"action": "<string>",
"retry_after_ms": 1
}
}
}{
"error": {
"code": "UNAUTHENTICATED",
"message": "<string>",
"retryable": true,
"request_id": "<string>",
"details": {},
"remediation": {
"action": "<string>",
"retry_after_ms": 1
}
}
}{
"error": {
"code": "UNAUTHENTICATED",
"message": "<string>",
"retryable": true,
"request_id": "<string>",
"details": {},
"remediation": {
"action": "<string>",
"retry_after_ms": 1
}
}
}sessionId and either a prompt or a panoramaUri. With a prompt, the scene model first generates a 360° panorama — optionally guided by reference images — and then builds the scene from it; with panoramaUri, it builds the scene from your panorama. The request is asynchronous: it answers immediately with a queued Scene Task whose ID starts with scn_, and you poll Get Scene Task until it finishes.
Instead of hosting your panorama at a panoramaUri, you can upload the image file with the request — see Upload a panorama file. Reference images for a prompt can be uploaded as files too — see Upload reference image files.
A ready pano task gives you the scene as an .spz Gaussian splat, the panorama, and an initial image batch of posed views. Pass that batch’s batchId to Generate Scene Views and Reconstruct Scene to extend the scene.
prompt, a panoramaUri, or an uploaded panorama file. Credits are reserved when the task is submitted and refunded in full unless it finishes ready. See Pricing.Sessions
Every scene request names asessionId of your choosing. A session holds one scene and every image batch made for it:
sessionIdis 1–128 ASCII letters, digits, underscores, or hyphens. It is scoped to your account, so it can’t collide with another customer’s.- A session runs one task at a time. Submitting while a task is still
queuedorprocessinganswers409, before anything is charged, with that task’s ID inerror.details.running_task_id— poll it, then submit again. referenceBatchIdsongenerateandreconstructonly accept batches made in the same session; a batch from another session fails the task withINVALID_REQUEST.
Request parameters
Sendapplication/json, up to 1 MiB, or multipart/form-data to upload the panorama or reference image files themselves — see Upload a panorama file and Upload reference image files. Unknown fields are rejected.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
sessionId | string | Yes | — | Session to build the scene in — see Sessions. |
prompt | string | One of prompt / panoramaUri / panorama | — | Description of the scene, 1–1000 characters, not blank. The panorama is generated from it. |
referenceImages | string[] | No | [] | Up to 8 image URLs that guide panorama generation. Only with prompt. Can’t be combined with referenceImageFiles. |
referenceImageFiles | file[] | No | — | Up to 8 reference images as files instead of URLs — JPEG, PNG, or WebP, up to 10 MiB each. Multipart only; see Upload reference image files. Only with prompt. Can’t be combined with referenceImages. |
quality | string | No | low | Panorama generation quality: low, medium, or high. Only with prompt. |
panoramaUri | string | One of prompt / panoramaUri / panorama | — | URL of an existing 360° panorama image to build the scene from. Can’t be combined with prompt, referenceImages, referenceImageFiles, or quality. |
panorama | file | One of prompt / panoramaUri / panorama | — | Your 360° panorama image as a file — JPEG, PNG, or WebP, up to 50 MiB. Multipart only; see Upload a panorama file. Can’t be combined with panoramaUri, prompt, referenceImages, referenceImageFiles, or quality. |
Upload a panorama file
To build the scene from a panorama on your machine, send the request asmultipart/form-data instead of JSON, with the image in a panorama file field:
- The other fields are the same as in the JSON body, each sent once.
sessionId,panoramaUri,prompt, andqualityare plain text;referenceImagescarries its JSON value as text, for examplereferenceImages=["https://example.com/a.jpg"]. - Send at most one
panoramafile. It must be 1 byte to 50 MiB, and its content must be a JPEG, PNG, or WebP image — the type is detected from the bytes, not from the file name or itsContent-Type. - The file takes the place of
panoramaUri: sending both is rejected, and so is a file together withprompt,referenceImages,referenceImageFiles, orquality. - It is priced the same as a scene from
panoramaUri.
panoramaUri. An upload that stops arriving before the server’s read deadline answers 408 UPLOAD_TIMEOUT; retry it, or host the image and pass panoramaUri instead.
Upload reference image files
To guide a prompt’s panorama with images on your machine, send the request asmultipart/form-data and put each image in a referenceImageFiles file field, repeated once per image:
- They take the place of
referenceImages: send image URLs inreferenceImagesor files inreferenceImageFiles, not both — even an emptyreferenceImageslist together with files is rejected. - Send 1 to 8 files. Each must be 1 byte to 10 MiB and a JPEG, PNG, or WebP image, detected from its bytes. They are used in the order you send them.
- Only with
prompt: files are rejected together withpanoramaUrior apanoramafile, and on Create Scene from Custom Panorama, Generate Scene Views, and Reconstruct Scene. - The other fields follow the same multipart rules as in Upload a panorama file. The price is that of any scene from a prompt.
URL rules
panoramaUri and referenceImages are fetched by Viggle’s servers, so each must be:
httporhttps, without a username or password, with a valid port if one is given;- on a host that resolves only to public internet addresses. Private, loopback, link-local, and carrier-grade NAT addresses are rejected with
400.
Response parameters
Returns200 OK with a Scene Task — the same shape Get Scene Task returns. It is usually queued, with queuePosition tasks ahead of it, or already processing if a slot was free. credits is what the task reserved — 6, for the panorama’s 6 views:
{
"id": "scn_0199f0c2-6a1e-7c3d-9b2a-4f5e6d7c8b9a.living-room-01",
"sessionId": "living-room-01",
"operation": "pano",
"status": "queued",
"credits": 6,
"queuePosition": 0,
"createdAt": 1791856740000,
"completedAt": null,
"result": null,
"error": null
}
Common errors
| Error | Cause |
|---|---|
400 INVALID_REQUEST | A field is missing, invalid, or unknown, or a URL breaks the URL rules. message names the field. No task starts. |
400 INVALID_REQUEST (multipart) | The form is malformed, a field is sent twice, a JSON-valued field isn’t valid JSON, a file other than one panorama or up to 8 referenceImageFiles is sent, a file is too large (50 MiB for the panorama, 10 MiB per reference image) or isn’t a JPEG, PNG, or WebP image, or referenceImages and referenceImageFiles are both sent. |
401 UNAUTHENTICATED | Missing or invalid API key. |
402 INSUFFICIENT_CREDITS | The balance can’t cover the task’s price. Nothing is queued. |
408 UPLOAD_TIMEOUT | A multipart upload didn’t finish arriving in time. Retryable. |
409 INVALID_REQUEST | The session already has a task queued or processing. error.details.running_task_id is that task; poll it before submitting again. |
429 RATE_LIMITED | Too many concurrent submissions on the same key. Retry shortly. |
503 SERVICE_BUSY | The scene model is temporarily unavailable. Retryable. |
Examples
curl -X POST https://apis.viggle.ai/v1/scenes/pano \
-H "Authorization: Bearer $VIGGLE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"sessionId": "living-room-01",
"prompt": "A sunlit Scandinavian living room with a grey sofa and large windows",
"quality": "low"
}'
import os, requests
response = requests.post(
"https://apis.viggle.ai/v1/scenes/pano",
headers={"Authorization": f"Bearer {os.environ['VIGGLE_API_KEY']}"},
json={
"sessionId": "living-room-01",
"prompt": "A sunlit Scandinavian living room with a grey sofa and large windows",
"quality": "low",
},
)
response.raise_for_status()
task = response.json()
const response = await fetch("https://apis.viggle.ai/v1/scenes/pano", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.VIGGLE_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
sessionId: "living-room-01",
prompt: "A sunlit Scandinavian living room with a grey sofa and large windows",
quality: "low",
}),
});
const task = await response.json();
From an existing panorama
curl -X POST https://apis.viggle.ai/v1/scenes/pano \
-H "Authorization: Bearer $VIGGLE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"sessionId": "courtyard-01",
"panoramaUri": "https://example.com/courtyard-360.jpg"
}'
From a local panorama file
curl -X POST https://apis.viggle.ai/v1/scenes/pano \
-H "Authorization: Bearer $VIGGLE_API_KEY" \
-F sessionId=courtyard-01 \
-F [email protected]
import os, requests
with open("courtyard-360.jpg", "rb") as f:
response = requests.post(
"https://apis.viggle.ai/v1/scenes/pano",
headers={"Authorization": f"Bearer {os.environ['VIGGLE_API_KEY']}"},
data={"sessionId": "courtyard-01"},
files={"panorama": f},
)
response.raise_for_status()
task = response.json()
import { openAsBlob } from "node:fs";
const form = new FormData();
form.append("sessionId", "courtyard-01");
form.append("panorama", await openAsBlob("courtyard-360.jpg"), "courtyard-360.jpg");
const response = await fetch("https://apis.viggle.ai/v1/scenes/pano", {
method: "POST",
headers: { Authorization: `Bearer ${process.env.VIGGLE_API_KEY}` },
body: form,
});
const task = await response.json();
Content-Type yourself: the client adds multipart/form-data with its boundary.
With local reference image files
curl -X POST https://apis.viggle.ai/v1/scenes/pano \
-H "Authorization: Bearer $VIGGLE_API_KEY" \
-F sessionId=loft-01 \
-F prompt="An industrial loft with exposed brick and warm evening light" \
-F [email protected] \
-F [email protected]
import os, requests
with open("loft-a.jpg", "rb") as a, open("loft-b.png", "rb") as b:
response = requests.post(
"https://apis.viggle.ai/v1/scenes/pano",
headers={"Authorization": f"Bearer {os.environ['VIGGLE_API_KEY']}"},
data={"sessionId": "loft-01", "prompt": "An industrial loft with exposed brick and warm evening light"},
files=[("referenceImageFiles", a), ("referenceImageFiles", b)],
)
response.raise_for_status()
task = response.json()
import { openAsBlob } from "node:fs";
const form = new FormData();
form.append("sessionId", "loft-01");
form.append("prompt", "An industrial loft with exposed brick and warm evening light");
form.append("referenceImageFiles", await openAsBlob("loft-a.jpg"), "loft-a.jpg");
form.append("referenceImageFiles", await openAsBlob("loft-b.png"), "loft-b.png");
const response = await fetch("https://apis.viggle.ai/v1/scenes/pano", {
method: "POST",
headers: { Authorization: `Bearer ${process.env.VIGGLE_API_KEY}` },
body: form,
});
const task = await response.json();
With reference image URLs
curl -X POST https://apis.viggle.ai/v1/scenes/pano \
-H "Authorization: Bearer $VIGGLE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"sessionId": "loft-01",
"prompt": "An industrial loft with exposed brick and warm evening light",
"referenceImages": ["https://example.com/loft-a.jpg", "https://example.com/loft-b.jpg"],
"quality": "high"
}'
Next step
Get Scene Task
Quick Start: Scene Model
Authorizations
Headers
Body
Body of POST /v1/scenes/pano. Send either prompt (optionally
with referenceImages and quality) or panoramaUri, not both.
Input URLs must be http(s), without credentials, on a host that
resolves only to public addresses.
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.
1 - 128^[A-Za-z0-9_-]+$"living-room-01"
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.

