SPAT · Playbook

How /try works, and the API

A SPAT turns a real object into an EMO — an Executable Media Object. A phone camera recognizes it and fires a clickable experience, and every scan settles to a royalty ledger. Two ways in: the /try playground, or the API. Base URL https://spatemo.com.

01 The /try playground — front to back

  1. Get a sandbox key. Enter your email → a key is minted instantly (no approval). Same email always returns the same key.
  2. Configure the EMO. Name it, pick 3D object or Flat image, mode Sandbox, a geo radius (NY / US / Global), and an experience (Hello / Shop / Follow / Unlock) — pre-filled with a working example you can edit right in the curl.
  3. Train the recognizer (on-device, nothing leaves the phone). 3D: the mesh-breakthrough camera — fill the frame, hold and orbit to capture every angle, then a background pass; a separation gate blocks an object that blends into its background. Flat: capture or upload the artwork → it compiles a MindAR target; a feature gate blocks low-detail/glossy art.
  4. Create. You get a shareable camera link, the live curl, an embed snippet, and a private ledger link.
  5. Scan it. Open the link on a phone, point at the object → the experience fires → the tap hits your ledger. Close the camera → a "see your ledger" email lands.

Tip: on iPhone, add /try to the Home Screen (Share → Add to Home Screen) — it launches full-screen with no browser chrome, which the camera capture wants.

02 The two recognizers

3D object KNN

MobileNet embeddings + a KNN classifier, trained in-browser from your object + background passes. Fires when the frame is clearly more like your object than its background.

Flat image MindAR

Feature-point image tracking. Compiles a .mind target from the artwork and locks onto the printed pattern with full pose — the one path that can trace the real edges.

Recognition runs 100% on the device. A confident match calls back to settle the ledger and return the experience overlay.

03 API quickstart

1 · Get a sandbox key (idempotent per email)

curl -X POST https://spatemo.com/v1/keys \
  -H "Content-Type: application/json" \
  -d '{"email":"you@company.com"}'
# → { "apiKey": "spat_sandbox_…", "id": "…", "tier": "sandbox" }

2 · Register an EMO

curl -X POST https://spatemo.com/v1/emo \
  -H "Authorization: Bearer $SPAT_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name":"World Cup Poster","type":"object","mode":"sandbox",
       "geo":"us","experience":"shop","url":"https://store.fifa.com/…"}'
# → { "emo_id": "emo_…", "share": "https://<slug>.spatemo.com",
#     "experience": "https://spatemo.com/e/emo_…",   // the camera link
#     "embed": "<script …>", "ledgerUrl": "https://spatemo.com/ledger/view?t=…" }

The API creates the EMO; the recognizer is attached separately — POST /emos/:id/knn (a KNN dataset for 3D) or POST /emos/:id/target (a compiled .mind for flat). The /try trainer produces both for you in the browser.

04 Endpoints

MethodPathWhat it does
POST/v1/keysMint a sandbox key (idempotent per email)
POST/v1/emoRegister an EMO
GET/emosList your EMOs
GET/emos/:idFetch one EMO
PATCH/emos/:idSwap the experience in place — live on the next scan, no re-register
DELETE/emos/:idDelete an EMO
POST/emos/:id/knnAttach a 3D recognizer (KNN dataset)
POST/emos/:id/targetAttach a flat recognizer (compiled .mind)

All of the above take Authorization: Bearer <key>. The camera pages handle recognition and settlement themselves (/emos/:id/detected, /cta-click) with a short-lived recognition token — you don't call those directly.

05 The vocabulary

EMO
Executable Media Object — a registered real-world object that a camera recognizes and makes clickable.
Experience
The prefab clickable overlay that fires on recognition: hello, shop (checkout), follow (social), unlock (reveal a code). Swappable with PATCH.
Share link
<slug>.spatemo.com or /e/:id — the isolated camera page for one EMO. Send it like a photo.
Ledger
Every detection + CTA tap mints a royalty entry. View it at the signed ledgerUrl, or the emailed link after the first scan.
Sandbox vs Live
Sandbox keys (spat_sandbox_) create sandbox EMOs — instant, no approval. Live mode requires an approved account.
SPAT · Executable Media Objects — playbook. Base URL https://spatemo.com · playground at /try. Recognition is on-device (TensorFlow.js + MindAR); the API is plain REST — a key and a curl.