Vitrine

API

vitrine REST API for managing models, scenes, and embeds programmatically.

The vitrine API lets you manage models, configure scenes, and generate embed codes from any HTTP client — your own scripts, CI pipelines, or AI agents.

Base URL

https://api.vitrine3d.com

Authentication

API Key

Generate a key in the dashboard under Account → API Keys. Include it in the Authorization header:

Authorization: Bearer vt_abc123...

Supabase JWT

If you already have a Supabase session (e.g. from the dashboard), you can use the JWT directly. The API accepts both API keys and JWTs.

Anonymous

If no credentials are provided on a write request, the API creates an anonymous session automatically. Anonymous uploads expire after 48 hours. Link them to a permanent account by signing up.

Quick Start

List your models:

curl https://api.vitrine3d.com/v1/models \
  -H "Authorization: Bearer vt_abc123..."

Upload a GLB file:

curl -X POST https://api.vitrine3d.com/v1/models \
  -H "Authorization: Bearer vt_abc123..." \
  -F [email protected] \
  -F name="Running Shoe"

Configure the scene:

curl -X PATCH https://api.vitrine3d.com/v1/models/MODEL_ID/config \
  -H "Authorization: Bearer vt_abc123..." \
  -H "Content-Type: application/json" \
  -d '{
    "bg_mode": "transparent",
    "hdri_preset": "studio_small_08_4k",
    "bloom_enabled": true,
    "bloom_intensity": 0.15
  }'

Publish and get embed code:

curl -X PATCH https://api.vitrine3d.com/v1/showcases/MODEL_ID \
  -H "Authorization: Bearer vt_abc123..." \
  -H "Content-Type: application/json" \
  -d '{"published": true}'

curl https://api.vitrine3d.com/v1/showcases/MODEL_ID/embed \
  -H "Authorization: Bearer vt_abc123..."

Endpoints

Models

MethodPathDescription
GET/v1/modelsList your models
POST/v1/modelsUpload a GLB file (multipart)
GET/v1/models/:idModel details with merged config
DELETE/v1/models/:idDelete model and storage

Config

MethodPathDescription
GET/v1/models/:id/configGet merged scene config (look + layout + overrides)
PATCH/v1/models/:id/configApply config patch

Showcases

MethodPathDescription
PATCH/v1/showcases/:idUpdate name, publish status, look, or layout
GET/v1/showcases/:id/embedGet embed HTML for a published model

Looks

MethodPathDescription
GET/v1/looksList your looks
POST/v1/looksCreate a look from a config
PATCH/v1/looks/:idUpdate look name or config
DELETE/v1/looks/:idDelete look

Thumbnails

MethodPathDescription
POST/v1/models/:id/thumbnailTrigger server-side thumbnail render

Feedback

MethodPathDescription
POST/v1/feedbackSubmit a bug report or feature request

Account

MethodPathDescription
GET/v1/accountCurrent user, plan, and usage
POST/v1/account/api-keysGenerate a new API key
DELETE/v1/account/api-keys/:idRevoke an API key

Reference (no auth required)

MethodPathDescription
GET/v1/hdrisList available HDRI presets
GET/v1/config-schemaScene config JSON schema

Config Patch Format

Only include fields you want to change. The patch is merged on top of the existing config:

{
  "bg_mode": "transparent",
  "bloom_enabled": true,
  "bloom_intensity": 0.15,
  "hdri_preset": "studio_small_08_4k",
  "auto_rotate": true
}

Use GET /v1/config-schema to see all available fields, types, enums, and defaults.

Rate Limits

Auth modeLimit
Anonymous20 requests/min
API Key (Free)60 requests/min
API Key (Pro)300 requests/min

Rate limit status is returned in the X-RateLimit-Remaining header.

Errors

All errors return a JSON body with error and message fields:

{
  "error": "model_not_found",
  "message": "No model found with ID 'abc123'"
}
StatusMeaning
400Invalid request (bad config patch, missing field)
401Not authenticated
403Not authorized (wrong owner, plan limit reached)
404Resource not found
429Rate limited — check Retry-After header

On this page