{
  "openapi": "3.1.0",
  "info": {
    "title": "Vesta Studio API",
    "version": "2026-10-24",
    "summary": "The HTTP endpoints behind Vesta Studio: AB 723 ledger verification and the staging studio.",
    "description": "This document lists only endpoints that are deployed today.\n\n**Access.** One endpoint is public (`GET /api/verify`). The studio endpoints are authenticated by the session of a signed-in Vesta account and are what the Vesta web studio calls. The `/api/v1` endpoints take a Vesta API key (`Authorization: Bearer vsk_live_...`), created from a signed-in account; keys are scoped and shown once. Enterprise integrations are arranged at https://vestastudio.io/contact?topic=api.\n\n**Async jobs.** `POST /api/v1/jobs` queues work and answers 202; read the result with `GET /api/v1/jobs/{id}` or receive a signed webhook. Credits are reserved when a job is queued and refunded if it finally fails. Live job types: `staging.render`, `staging.restyle`, `edit.add_furniture`, `edit.declutter`, `edit.remove_objects`, `edit.twilight`, `edit.weather` (clear sky), `edit.upscale` (1 credit each) and `diagnostics.ping` (free). Room types and styles take the studio tokens, in any case (`living room`, `LIVINGROOM`). Every output image is stored by Vesta, carries the AB 723 disclosure (except upscales, which change nothing) and is returned with its SHA-256.\n\n**Errors.** JSON routes answer errors as `{ \"error\": string }` with the status codes listed per operation. Some studio routes answer errors with a plain-text body; those are marked `text/plain`.\n\n**Planned endpoints** are listed under `x-vesta-planned`. They are not live and do not respond.",
    "contact": {
      "name": "Vesta Studio",
      "email": "info@vestastudio.io",
      "url": "https://vestastudio.io/contact?topic=api"
    },
    "termsOfService": "https://vestastudio.io/terms"
  },
  "servers": [
    {
      "url": "https://vestastudio.io",
      "description": "Production"
    }
  ],
  "tags": [
    {
      "name": "Verification",
      "description": "Public. Check whether Vesta produced a file, by its SHA-256. No account needed."
    },
    {
      "name": "Account",
      "description": "The signed-in account. Studio session, or the access token issued to the Vesta iOS app."
    },
    {
      "name": "Tours",
      "description": "360 and walkthrough tours: panoramas, doorway links, hotspots, guided steps and a public share link. Vesta API key with tours:read or tours:write, or the owner's session."
    },
    {
      "name": "Jobs",
      "description": "Async jobs and batches for server-to-server integrations. Vesta API key with jobs:read or jobs:write."
    },
    {
      "name": "Studio",
      "description": "Staging, listings, exports and AB 723 original-photo links. Studio session (upload, stage, rooms and originals also accept the iOS app token); external access by arrangement."
    }
  ],
  "paths": {
    "/api/v1/jobs": {
      "post": {
        "operationId": "createJob",
        "summary": "Queue an async job",
        "description": "Validates the input, reserves the job's credits and queues it. Repeating a request with the same idempotency_key returns the original job with 200 and charges nothing.",
        "tags": [
          "Jobs"
        ],
        "security": [
          {
            "vestaApiKey": [
              "jobs:write"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/JobRequest"
              },
              "example": {
                "type": "diagnostics.ping",
                "input": {
                  "echo": "hello"
                },
                "idempotency_key": "order-1234"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "An earlier job with this idempotency_key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Job"
                }
              }
            }
          },
          "202": {
            "description": "Queued.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Job"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request or input.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "402": {
            "description": "Not enough credits.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "The key lacks the jobs:write scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Unknown job type.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "501": {
            "description": "The job type ships in a later release.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-vesta-availability": "api-key",
        "x-vesta-rate-limit": "120 requests per minute per key"
      },
      "get": {
        "operationId": "listJobs",
        "summary": "List recent jobs",
        "description": "The account's 25 most recent jobs, newest first.",
        "tags": [
          "Jobs"
        ],
        "security": [
          {
            "vestaApiKey": [
              "jobs:read"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "Jobs.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "object": {
                      "const": "list"
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Job"
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "The key lacks the jobs:read scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-vesta-availability": "api-key"
      }
    },
    "/api/v1/jobs/{id}": {
      "get": {
        "operationId": "getJob",
        "summary": "Read a job",
        "tags": [
          "Jobs"
        ],
        "security": [
          {
            "vestaApiKey": [
              "jobs:read"
            ]
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "The job id (UUID).",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The job.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Job"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "No such job on this account.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-vesta-availability": "api-key"
      },
      "delete": {
        "operationId": "cancelJob",
        "summary": "Cancel a queued job",
        "description": "Cancels a job that has not started and refunds its credits.",
        "tags": [
          "Jobs"
        ],
        "security": [
          {
            "vestaApiKey": [
              "jobs:write"
            ]
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "The job id (UUID).",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Canceled.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Job"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "No such job on this account.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "The job is running or finished.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-vesta-availability": "api-key"
      }
    },
    "/api/tours": {
      "get": {
        "operationId": "listTours",
        "summary": "List tours",
        "description": "The account's tours, newest first (archived tours left out). The Vesta mobile app reads this list.",
        "tags": [
          "Tours"
        ],
        "security": [
          {
            "vestaApiKey": [
              "tours:read"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "{ tours: [...] }",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "tours": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Not signed in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-vesta-availability": "api-key"
      },
      "post": {
        "operationId": "createTour",
        "summary": "Create a draft tour",
        "tags": [
          "Tours"
        ],
        "security": [
          {
            "vestaApiKey": [
              "tours:write"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "title"
                ],
                "properties": {
                  "title": {
                    "type": "string",
                    "maxLength": 160
                  },
                  "listing_id": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The new tour.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Not signed in or no key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Too many tours.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-vesta-availability": "api-key"
      }
    },
    "/api/tours/{id}": {
      "get": {
        "operationId": "getTour",
        "summary": "Read a tour by id (owner) or by share slug (published)",
        "tags": [
          "Tours"
        ],
        "security": [
          {
            "vestaApiKey": [
              "tours:read"
            ]
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Tour id, or a published tour's share slug.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "{ tour }",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "404": {
            "description": "Not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-vesta-availability": "api-key"
      },
      "patch": {
        "operationId": "updateTour",
        "summary": "Rename, set the start room or the autoplay and autorotate settings",
        "tags": [
          "Tours"
        ],
        "security": [
          {
            "vestaApiKey": [
              "tours:write"
            ]
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "The tour id.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "title": {
                    "type": "string"
                  },
                  "start_scene_id": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "settings": {
                    "type": "object",
                    "properties": {
                      "autoplay": {
                        "type": "boolean"
                      },
                      "autorotate": {
                        "type": "boolean"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Updated.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "No such tour.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-vesta-availability": "api-key"
      },
      "delete": {
        "operationId": "archiveTour",
        "summary": "Archive a tour and take its share link down",
        "tags": [
          "Tours"
        ],
        "security": [
          {
            "vestaApiKey": [
              "tours:write"
            ]
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "The tour id.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Archived.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "404": {
            "description": "No such tour.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-vesta-availability": "api-key"
      }
    },
    "/api/tours/{id}/scenes": {
      "post": {
        "operationId": "addTourScene",
        "summary": "Upload a room's 360 panorama",
        "description": "Multipart form: `file` (equirectangular 2:1, at least 2048 px wide, up to 30 MB), `title`, optional `floor`, optional `splat` (.ply, .splat, .spz or .ksplat, up to 80 MB). Stored as a 4096 px image and a 1024 px preview with metadata (GPS included) removed.",
        "tags": [
          "Tours"
        ],
        "security": [
          {
            "vestaApiKey": [
              "tours:write"
            ]
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "The tour id.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "required": [
                  "file",
                  "title"
                ],
                "properties": {
                  "file": {
                    "type": "string",
                    "format": "binary"
                  },
                  "title": {
                    "type": "string"
                  },
                  "floor": {
                    "type": "integer"
                  },
                  "splat": {
                    "type": "string",
                    "format": "binary"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The new scene.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Not a 2:1 panorama, or missing fields.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "413": {
            "description": "File too large.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-vesta-availability": "api-key"
      }
    },
    "/api/tours/{id}/graph": {
      "put": {
        "operationId": "replaceTourGraph",
        "summary": "Replace the tour's links, hotspots and guided steps",
        "description": "All three are replaced in one transaction. yaw is -180 to 180 (0 = the panorama's centre, positive to the right); pitch is -90 to 90. Measurement hotspots show the value as entered.",
        "tags": [
          "Tours"
        ],
        "security": [
          {
            "vestaApiKey": [
              "tours:write"
            ]
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "The tour id.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "links",
                  "hotspots",
                  "steps"
                ],
                "properties": {
                  "links": {
                    "type": "array",
                    "items": {
                      "type": "object"
                    }
                  },
                  "hotspots": {
                    "type": "array",
                    "items": {
                      "type": "object"
                    }
                  },
                  "steps": {
                    "type": "array",
                    "items": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Saved.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Invalid graph, or a scene outside the tour.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-vesta-availability": "api-key"
      }
    },
    "/api/tours/{id}/publish": {
      "post": {
        "operationId": "publishTour",
        "summary": "Publish: check the tour and give it a share link",
        "description": "Refused with the reasons (409) until every room can be reached from the start room. Emits tour.published.",
        "tags": [
          "Tours"
        ],
        "security": [
          {
            "vestaApiKey": [
              "tours:write"
            ]
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "The tour id.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "{ status, share_url }",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "409": {
            "description": "Not publishable; see error.problems.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-vesta-availability": "api-key"
      },
      "delete": {
        "operationId": "unpublishTour",
        "summary": "Unpublish: the share link stops working",
        "tags": [
          "Tours"
        ],
        "security": [
          {
            "vestaApiKey": [
              "tours:write"
            ]
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "The tour id.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "{ status: draft }",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "409": {
            "description": "Not published.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-vesta-availability": "api-key"
      }
    },
    "/api/public/tours/{slug}": {
      "get": {
        "operationId": "getPublicTour",
        "summary": "A published tour's viewer manifest",
        "description": "No account needed. Scenes, links, hotspots, guided steps and same-origin media URLs; drafts answer 404. The page at /t/{slug} renders it.",
        "tags": [
          "Tours"
        ],
        "security": [],
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "description": "The share slug.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The manifest.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "404": {
            "description": "No such published tour.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-vesta-availability": "public"
      }
    },
    "/api/v1/batches/{id}": {
      "get": {
        "operationId": "getBatch",
        "summary": "Read batch progress",
        "description": "Counts by status, `complete` once no item is queued or running, and every item's job.",
        "tags": [
          "Jobs"
        ],
        "security": [
          {
            "vestaApiKey": [
              "jobs:read"
            ]
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "The batch id (UUID).",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The batch.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Batch"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "No such batch on this account.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-vesta-availability": "api-key"
      }
    },
    "/api/v1/batches": {
      "post": {
        "operationId": "createBatch",
        "summary": "Queue up to 50 jobs of one type",
        "description": "With shared_seed (default true) every item shares one generation seed, so all angles of a room keep one style, palette and furniture language. The batch is refused whole if any item is invalid or the account cannot cover every item.",
        "tags": [
          "Jobs"
        ],
        "security": [
          {
            "vestaApiKey": [
              "jobs:write"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BatchRequest"
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Queued.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Batch"
                }
              }
            }
          },
          "400": {
            "description": "Invalid batch or item.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "402": {
            "description": "Not enough credits for every item.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "501": {
            "description": "The job type ships in a later release.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        },
        "x-vesta-availability": "api-key"
      }
    },
    "/api/verify": {
      "get": {
        "operationId": "verifyFile",
        "summary": "Look up a file on the AB 723 audit ledger",
        "description": "Hash the file locally (SHA-256 of its exact bytes) and send only the digest. Answers whether Vesta produced a render or delivered an export with those bytes, the disclosure version it carried and the date it was recorded. Reveals nothing about who produced it. A file recompressed by a listing portal has different bytes and will not be found.",
        "tags": [
          "Verification"
        ],
        "security": [],
        "parameters": [
          {
            "name": "sha256",
            "in": "query",
            "required": true,
            "description": "SHA-256 of the file, 64 hexadecimal characters (case-insensitive).",
            "schema": {
              "type": "string",
              "pattern": "^[0-9a-fA-F]{64}$"
            },
            "example": "9f3c2a0d4e5b6c7d8e9f0a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a9b0c1d"
          }
        ],
        "responses": {
          "200": {
            "description": "Lookup result. A positive answer is cacheable for an hour; a negative one is not cached.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VerifyResult"
                },
                "example": {
                  "found": true,
                  "kind": "export",
                  "disclosureVersion": "ab723-v1",
                  "recordedOn": "2026-10-02"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "503": {
            "description": "The ledger could not be read.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-vesta-availability": "public",
        "x-vesta-rate-limit": "30 requests per minute per client IP"
      }
    },
    "/api/user/me": {
      "get": {
        "operationId": "getAccount",
        "summary": "The signed-in account and its credit balance",
        "description": "Read fresh from the database on every call.",
        "tags": [
          "Account"
        ],
        "security": [
          {
            "studioSession": []
          },
          {
            "appAccessToken": []
          }
        ],
        "responses": {
          "200": {
            "description": "The account.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "user"
                  ],
                  "properties": {
                    "user": {
                      "$ref": "#/components/schemas/Account"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "500": {
            "description": "The account could not be read.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-vesta-availability": "session-or-bearer"
      }
    },
    "/api/upload": {
      "post": {
        "operationId": "uploadPhoto",
        "summary": "Upload a source photo",
        "description": "Accepts one JPG, PNG or WEBP photo of up to 4 MB and returns a URL to pass as originalImage to POST /api/listings or POST /api/stage.",
        "tags": [
          "Studio"
        ],
        "security": [
          {
            "studioSession": []
          },
          {
            "appAccessToken": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "required": [
                  "file"
                ],
                "properties": {
                  "file": {
                    "type": "string",
                    "format": "binary",
                    "description": "The photo."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The stored photo.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "url"
                  ],
                  "properties": {
                    "url": {
                      "type": "string",
                      "description": "URL (or data: URI) of the uploaded photo."
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "No file uploaded, or the body is not multipart/form-data.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "No studio session.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "413": {
            "description": "The photo is over 4 MB.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "415": {
            "description": "Photos must be JPG, PNG or WEBP, and the bytes must match the declared type.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "description": "Upload failed.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "x-vesta-availability": "session-or-bearer"
      }
    },
    "/api/listings": {
      "post": {
        "operationId": "createListing",
        "summary": "Create a listing and one pending frame per photo",
        "description": "Groups photos into a listing with a server-generated trace id (for example VST-A14F09) and creates one pending room per frame. Nothing renders here; each frame is rendered with POST /api/stage. Room type and style are validated at creation, so an unstageable frame is refused immediately.",
        "tags": [
          "Studio"
        ],
        "security": [
          {
            "studioSession": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateListingRequest"
              },
              "example": {
                "address": "1428 Elm Street",
                "locality": "Dallas, TX",
                "frames": [
                  {
                    "originalImage": "https://cdn.example.com/uploads/frame-01.jpg",
                    "roomType": "living-room",
                    "designStyle": "modern",
                    "areaLabel": "Great room"
                  },
                  {
                    "originalImage": "https://cdn.example.com/uploads/frame-02.jpg",
                    "roomType": "bedroom",
                    "designStyle": "scandinavian"
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The listing with its frames, ordered by frameIndex.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Listing"
                }
              }
            }
          },
          "400": {
            "description": "No usable frame (plain text), or a frame with an unsupported room type or style (JSON naming the frame).",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "roomType": {
                      "type": "string"
                    },
                    "designStyle": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "No studio session.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "description": "Internal error.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "x-vesta-availability": "session"
      }
    },
    "/api/stage": {
      "post": {
        "operationId": "stageRoom",
        "summary": "Render one staged room",
        "description": "Charges the configured credit cost (none when the account renders on its own Decor8 key), starts the render and returns at once. The render finishes in the background: the AB 723 disclosure is burned into the image, it is hashed and written to the audit ledger, and only then is the room marked completed. Poll GET /api/rooms?id= for status. A failed render refunds its credit. Send roomId to re-render an existing frame of a listing.",
        "tags": [
          "Studio"
        ],
        "security": [
          {
            "studioSession": []
          },
          {
            "appAccessToken": []
          }
        ],
        "parameters": [
          {
            "name": "x-decor8-api-key",
            "in": "header",
            "required": false,
            "description": "Optional bring-your-own Decor8 key for this request. When present (or saved on the account) no credit is charged.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/StageRequest"
              },
              "example": {
                "roomType": "living-room",
                "designStyle": "modern",
                "originalImage": "https://cdn.example.com/uploads/frame-01.jpg",
                "userPrompt": "Warm oak, linen sofa",
                "seed": 42
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Render accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "roomId"
                  ],
                  "properties": {
                    "roomId": {
                      "type": "string"
                    }
                  }
                },
                "example": {
                  "roomId": "clx0example0room"
                }
              }
            }
          },
          "400": {
            "description": "Body is not a JSON object, the original image is missing or not a string, userPrompt is over 4,000 characters, or the room type or style is unsupported.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "No studio session.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "402": {
            "description": "Insufficient credits.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "roomId does not belong to the account.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "429": {
            "description": "More than 30 renders in a minute for this account.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "description": "Internal error.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "description": "The credit balance could not be checked, or the render could not be recorded. Nothing was charged.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "x-vesta-availability": "session-or-bearer",
        "x-vesta-rate-limit": "30 renders per minute per account"
      }
    },
    "/api/rooms": {
      "get": {
        "operationId": "getRooms",
        "summary": "Read a room, a listing, or every room",
        "description": "With id: one room, including its render status. With listingId: the listing and its rooms. With neither: every room on the account, newest first.",
        "tags": [
          "Studio"
        ],
        "security": [
          {
            "studioSession": []
          },
          {
            "appAccessToken": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "query",
            "required": false,
            "description": "A room id.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "listingId",
            "in": "query",
            "required": false,
            "description": "A listing id.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A room, a listing, or an array of rooms, depending on the parameters.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/Room"
                    },
                    {
                      "$ref": "#/components/schemas/Listing"
                    },
                    {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Room"
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "No studio session.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "Not found on this account.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "description": "Internal error.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "x-vesta-availability": "session-or-bearer"
      },
      "delete": {
        "operationId": "deleteRoom",
        "summary": "Delete a room",
        "description": "Refused for a room that has audit-ledger entries: the ledger is append-only and the record it proves must survive.",
        "tags": [
          "Studio"
        ],
        "security": [
          {
            "studioSession": []
          },
          {
            "appAccessToken": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "query",
            "required": true,
            "description": "The room id.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "const": true
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Missing room id.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "No studio session.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "Not found on this account.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "description": "This render has a compliance ledger and cannot be deleted.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "description": "Internal error.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "x-vesta-availability": "session-or-bearer"
      }
    },
    "/api/download": {
      "post": {
        "operationId": "exportRoom",
        "summary": "Export a finished render",
        "description": "Produces the delivered file server-side and records its SHA-256 on the audit ledger as an export. The AB 723 disclosure is already in the image and has no switch. originalQr (default true) prints a QR code to the frame's public original-photo page; turn it off where an MLS forbids QR codes and use the listing originals link instead. removeVestaMark is honoured only for accounts entitled to it, re-checked against the database.",
        "tags": [
          "Studio"
        ],
        "security": [
          {
            "studioSession": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ExportRequest"
              },
              "example": {
                "roomId": "clx0example0room",
                "format": "jpg",
                "originalQr": true
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The image file, as an attachment.",
            "content": {
              "image/jpeg": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              },
              "image/png": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "400": {
            "description": "roomId is required, or the body is not a JSON object.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "No studio session.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "Not found on this account.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "409": {
            "description": "The render is not ready for export yet.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "description": "Internal error.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "x-vesta-availability": "session"
      }
    },
    "/api/originals": {
      "post": {
        "operationId": "getOriginalLink",
        "summary": "Public original-photo link and QR code",
        "description": "Returns the public page showing the unaltered original for one frame (roomId) or for every frame of a listing (listingId), creating it on first request, plus a QR code for it. This is the link AB 723 requires an advertisement to carry; placing it in the advertisement is the agent's step.",
        "tags": [
          "Studio"
        ],
        "security": [
          {
            "studioSession": []
          },
          {
            "appAccessToken": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/OriginalLinkRequest"
              },
              "example": {
                "listingId": "clx0example0listing"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The link and a QR code as a PNG data URI.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OriginalLink"
                }
              }
            }
          },
          "400": {
            "description": "Neither roomId nor listingId, or the body is not JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "No studio session.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found on this account.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-vesta-availability": "session-or-bearer"
      }
    }
  },
  "components": {
    "securitySchemes": {
      "vestaApiKey": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "vsk_live_<id>_<secret>",
        "description": "A Vesta API key created from a signed-in account. Scoped (jobs:read, jobs:write, ...), revocable, shown once; only its SHA-256 is stored."
      },
      "studioSession": {
        "type": "apiKey",
        "in": "cookie",
        "name": "__Secure-next-auth.session-token",
        "description": "The session of a signed-in Vesta account, set by signing in at /login. Not an API key: it cannot be issued to a server. External access to the studio endpoints is by arrangement."
      },
      "appAccessToken": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "JWT",
        "description": "A one-hour access token issued only to the Vesta iOS app, after Sign in with Apple or an email code. Not available to third parties."
      }
    },
    "responses": {
      "BadRequest": {
        "description": "The request is malformed.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            },
            "example": {
              "error": "Expected a SHA-256 digest: 64 hexadecimal characters."
            }
          }
        }
      },
      "Unauthorized": {
        "description": "No valid session or token.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            },
            "example": {
              "error": "Unauthorized"
            }
          }
        }
      },
      "RateLimited": {
        "description": "Too many requests from this client. Wait a minute and retry.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            },
            "example": {
              "error": "Too many lookups. Try again in a minute."
            }
          }
        }
      }
    },
    "schemas": {
      "ApiError": {
        "type": "object",
        "required": [
          "error"
        ],
        "properties": {
          "error": {
            "type": "object",
            "required": [
              "code",
              "message"
            ],
            "properties": {
              "code": {
                "type": "string"
              },
              "message": {
                "type": "string"
              }
            }
          }
        }
      },
      "JobRequest": {
        "type": "object",
        "required": [
          "type"
        ],
        "properties": {
          "type": {
            "type": "string",
            "description": "A job type, e.g. diagnostics.ping, staging.render, edit.declutter, edit.twilight."
          },
          "input": {
            "type": "object",
            "description": "Input for the job type; unknown fields are refused."
          },
          "idempotency_key": {
            "type": "string",
            "minLength": 8,
            "maxLength": 128
          }
        }
      },
      "Job": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "object": {
            "const": "job"
          },
          "type": {
            "type": "string"
          },
          "status": {
            "enum": [
              "queued",
              "running",
              "succeeded",
              "failed",
              "canceled"
            ]
          },
          "result": {},
          "error": {
            "type": [
              "string",
              "null"
            ]
          },
          "attempts": {
            "type": "integer"
          },
          "credits": {
            "type": "integer"
          },
          "batch_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          },
          "finished_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          }
        }
      },
      "BatchRequest": {
        "type": "object",
        "required": [
          "type",
          "items"
        ],
        "properties": {
          "type": {
            "type": "string"
          },
          "shared_seed": {
            "type": "boolean",
            "default": true
          },
          "items": {
            "type": "array",
            "minItems": 1,
            "maxItems": 50,
            "items": {
              "type": "object"
            }
          },
          "idempotency_key": {
            "type": "string",
            "minLength": 8,
            "maxLength": 128
          }
        }
      },
      "Batch": {
        "type": "object",
        "properties": {
          "object": {
            "const": "batch"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "type": {
            "type": "string"
          },
          "shared_seed": {
            "type": [
              "integer",
              "null"
            ]
          },
          "count": {
            "type": "integer"
          },
          "complete": {
            "type": "boolean",
            "description": "Batch status only."
          },
          "counts": {
            "type": "object",
            "description": "Jobs by status (batch status only)."
          },
          "jobs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Job"
            }
          }
        }
      },
      "Error": {
        "type": "object",
        "required": [
          "error"
        ],
        "properties": {
          "error": {
            "type": "string",
            "description": "A human-readable message."
          }
        }
      },
      "VerifyResult": {
        "oneOf": [
          {
            "type": "object",
            "required": [
              "found",
              "kind",
              "disclosureVersion",
              "recordedOn"
            ],
            "properties": {
              "found": {
                "const": true
              },
              "kind": {
                "type": "string",
                "enum": [
                  "render",
                  "export"
                ],
                "description": "A render Vesta produced, or an export Vesta delivered."
              },
              "disclosureVersion": {
                "type": "string",
                "description": "The disclosure mark burned into the file, e.g. ab723-v1."
              },
              "recordedOn": {
                "type": "string",
                "format": "date",
                "description": "Date only (UTC)."
              }
            }
          },
          {
            "type": "object",
            "required": [
              "found"
            ],
            "properties": {
              "found": {
                "const": false
              }
            }
          }
        ]
      },
      "Account": {
        "type": "object",
        "required": [
          "id",
          "credits",
          "plan"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": [
              "string",
              "null"
            ]
          },
          "email": {
            "type": [
              "string",
              "null"
            ],
            "format": "email"
          },
          "image": {
            "type": [
              "string",
              "null"
            ]
          },
          "credits": {
            "type": "integer",
            "minimum": 0,
            "description": "One credit renders one standard image."
          },
          "plan": {
            "type": "string",
            "description": "Plan tier; FREE until a subscription activates."
          },
          "subscriptionStatus": {
            "type": [
              "string",
              "null"
            ]
          },
          "removesBranding": {
            "type": "boolean"
          },
          "onboarded": {
            "type": "boolean"
          },
          "welcomeGiftClaimed": {
            "type": "boolean"
          }
        }
      },
      "Frame": {
        "type": "object",
        "required": [
          "originalImage"
        ],
        "properties": {
          "originalImage": {
            "type": "string",
            "description": "URL of the source photo (as returned by the studio upload) or a data: URI."
          },
          "roomType": {
            "type": "string",
            "enum": [
              "living-room",
              "bedroom",
              "kitchen",
              "office",
              "dining-room",
              "bathroom"
            ],
            "default": "living-room"
          },
          "designStyle": {
            "type": "string",
            "enum": [
              "modern",
              "scandinavian",
              "bohemian",
              "industrial",
              "mid-century",
              "rustic"
            ],
            "default": "modern"
          },
          "areaLabel": {
            "type": "string",
            "description": "Your own name for the space, e.g. Primary Bedroom."
          },
          "spec": {
            "type": "object",
            "description": "Optional spatial brief (dimensions, ceiling height, light, condition). Steers the render prompt; it is not a geometric constraint."
          }
        }
      },
      "CreateListingRequest": {
        "type": "object",
        "required": [
          "frames"
        ],
        "properties": {
          "frames": {
            "type": "array",
            "minItems": 1,
            "items": {
              "$ref": "#/components/schemas/Frame"
            }
          },
          "address": {
            "type": "string"
          },
          "locality": {
            "type": "string"
          }
        }
      },
      "Listing": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "traceId": {
            "type": "string",
            "description": "Server-generated, e.g. VST-A14F09."
          },
          "address": {
            "type": [
              "string",
              "null"
            ]
          },
          "locality": {
            "type": [
              "string",
              "null"
            ]
          },
          "createTime": {
            "type": "string",
            "format": "date-time"
          },
          "stagedRooms": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Room"
            }
          }
        }
      },
      "Room": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "roomType": {
            "type": "string"
          },
          "designStyle": {
            "type": "string"
          },
          "areaLabel": {
            "type": [
              "string",
              "null"
            ]
          },
          "originalImage": {
            "type": "string"
          },
          "stagedImage": {
            "type": "string",
            "description": "Empty until the render completes. Disclosure-hardened once status is completed."
          },
          "status": {
            "type": "string",
            "enum": [
              "pending",
              "generating",
              "completed",
              "failed"
            ]
          },
          "stage": {
            "type": "string",
            "enum": [
              "processing",
              "hardening",
              "completed",
              "failed"
            ]
          },
          "sha256": {
            "type": [
              "string",
              "null"
            ],
            "description": "SHA-256 of the disclosure-hardened image."
          },
          "disclosureVersion": {
            "type": [
              "string",
              "null"
            ]
          },
          "watermarkedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "listingId": {
            "type": [
              "string",
              "null"
            ]
          },
          "frameIndex": {
            "type": [
              "integer",
              "null"
            ]
          },
          "createTime": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "StageRequest": {
        "type": "object",
        "required": [
          "roomType",
          "designStyle",
          "originalImage"
        ],
        "properties": {
          "roomType": {
            "type": "string",
            "enum": [
              "living-room",
              "bedroom",
              "kitchen",
              "office",
              "dining-room",
              "bathroom"
            ]
          },
          "designStyle": {
            "type": "string",
            "enum": [
              "modern",
              "scandinavian",
              "bohemian",
              "industrial",
              "mid-century",
              "rustic"
            ]
          },
          "originalImage": {
            "type": "string",
            "description": "URL or data: URI of the source photo."
          },
          "userPrompt": {
            "type": "string",
            "description": "Optional direction for the render."
          },
          "roomId": {
            "type": "string",
            "description": "Re-render this existing room instead of creating one."
          },
          "seed": {
            "type": "integer",
            "minimum": 0,
            "maximum": 2147483647,
            "description": "Optional; anything else is ignored."
          }
        }
      },
      "ExportRequest": {
        "type": "object",
        "required": [
          "roomId"
        ],
        "properties": {
          "roomId": {
            "type": "string"
          },
          "format": {
            "type": "string",
            "enum": [
              "jpg",
              "jpeg",
              "png"
            ],
            "description": "Defaults to the render's own format."
          },
          "originalQr": {
            "type": "boolean",
            "default": true,
            "description": "Print a QR code to the frame's public original-photo page."
          },
          "removeVestaMark": {
            "type": "boolean",
            "default": false,
            "description": "Honoured only for accounts entitled to it."
          }
        }
      },
      "OriginalLinkRequest": {
        "type": "object",
        "description": "Send exactly one of roomId or listingId.",
        "properties": {
          "roomId": {
            "type": "string"
          },
          "listingId": {
            "type": "string"
          }
        }
      },
      "OriginalLink": {
        "type": "object",
        "required": [
          "url",
          "qr"
        ],
        "properties": {
          "url": {
            "type": "string",
            "format": "uri",
            "description": "Public page showing the unaltered original(s)."
          },
          "qr": {
            "type": "string",
            "description": "PNG data URI of a QR code for url."
          }
        }
      }
    }
  },
  "x-vesta-rate-limits": [
    {
      "scope": "Sign-in endpoints (/api/auth/*)",
      "limit": "10 requests per minute per client IP"
    },
    {
      "scope": "Contact form (/api/contact)",
      "limit": "5 requests per minute per client IP"
    },
    {
      "scope": "All other /api routes",
      "limit": "120 requests per minute per client IP",
      "note": "The Stripe webhook receiver is exempt."
    },
    {
      "scope": "GET /api/verify",
      "limit": "30 requests per minute per client IP",
      "note": "Route limit, in addition to the general one."
    },
    {
      "scope": "POST /api/stage",
      "limit": "30 renders per minute per account",
      "note": "Route limit, in addition to the general one."
    }
  ],
  "x-vesta-webhooks": {
    "status": "available",
    "events": [
      "job.succeeded",
      "job.failed",
      "job.canceled",
      "batch.completed",
      "tour.published",
      "webhook.test (sent on request from developer settings)"
    ],
    "signature": "Vesta-Signature: t=<unix seconds>,v1=<hex HMAC-SHA256 of \"<t>.<raw body>\">; reject deliveries more than 5 minutes old.",
    "retries": "1m, 5m, 30m, 2h, 6h, 12h, 24h, then dead. An endpoint is disabled after 50 consecutive failures.",
    "description": "Register an https endpoint at /settings/developers; its signing secret is shown on creation and can be rotated. Deliveries are POSTs with a JSON body { id, type, created_at, data } and headers Vesta-Signature, Vesta-Event and Vesta-Delivery."
  },
  "x-vesta-planned": [
    {
      "path": "Gaussian splat rendering in the tour viewer",
      "summary": "3D scenes (.ply, .splat, .spz, .ksplat)",
      "description": "Splat files upload and are served today; the viewer shows each splat scene's fallback panorama until the splat renderer ships."
    },
    {
      "path": "Season and wet-surface edits",
      "summary": "edit.weather targets beyond clear_sky",
      "description": "Summer, autumn, winter and dry-surface edits. Not offered until a provider supports them truthfully."
    }
  ]
}