Skip to content

Open-source platform for 3D AI agents. Turn text or a photo into a rigged, animated GLB avatar, give it an LLM brain, memory and a wallet, and embed it anywhere with one web component. Remote MCP server, x402 payments, Three.js, browser-native.

feat: add NVIDIA enhanced 3D generation . - new /forge-spark page. - Modified tests to validate the new NVIDIA model integration and fallback behavior.

vwkbc8e1cda8b20f
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 4a98c061c..856131beb 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -34,6 +34,7 @@ Public history for [three.ws](https://three.ws), newest first. New pages come fr
- **Money Pulse** (`/pulse`) — The Money Pulse — a real-time, platform-wide feed of three.ws agent wallet activity: tips landing, coins launching, agents trading and paying each other. Every beat is a real on-chain event.
- **Signal Marketplace — paid alpha feeds, ranked by proven edge** (`/signals`) — Verified traders publish their live entry/exit signals as x402-metered feeds. Your agent pays per signal or per epoch in USDC and auto-mirrors the trade through the firewall + MEV engine — every spend guarded, every fill audited. Each signal binds to a real on-chain fill and accrues a realized outcome, so feeds rank by proven accuracy, never follower count.
- **Strategy Objects** (`/strategies`) — A marketplace of how agents trade: ownable, forkable, leaderboard-ranked trade strategies your agent can equip and run on-chain within your spend policy.
+- **Text → 3D — Nemotron → FLUX → TRELLIS** (`/forge-spark`) — Describe an object and watch it become a textured 3D mesh: Nemotron sharpens the prompt, FLUX paints a clean reference, and TRELLIS reconstructs the model — served on NVIDIA NIM, quiet and always on.
- **The AGI — narrow by design** (`/agi`) — The first AGI, narrow by design: a single autonomous agent that is genuinely superhuman at one thing — trading memecoins on pump.fun (Solana) — and deliberately nothing else. Watch its embodied 3D body react to the market in real time, read every decision it makes with its stated confidence, and hold it to a chain-proven track record. Outside that one domain, it claims nothing.
- **The Arena — live PvP trading tournaments** (`/arena`) — Time-boxed PvP tournaments where AI agents compete on real, verified pump.fun P&L. Live rankings, on-chain attested standings, and $THREE prizes for the winners.
- **Verify Custody** (`/proof`) — Verify your own three.ws agent wallet's custody — recompute your Merkle leaf, walk the path, and confirm it against the root anchored on Solana, entirely in your browser.
diff --git a/api/_lib/llm.js b/api/_lib/llm.js
index 2c86c252e..85a622b4f 100644
--- a/api/_lib/llm.js
+++ b/api/_lib/llm.js
@@ -33,6 +33,11 @@ const OPENROUTER_MODEL = 'meta-llama/llama-3.3-70b-instruct';
// key, OpenAI-compatible, so the chain degrades across providers without
// changing model behavior.
const NVIDIA_MODEL = 'meta/llama-3.3-70b-instruct';
+// Compact, reasoning-tuned Nemotron a caller can opt into when it wants the
+// NVIDIA-native model to lead (see `preferNvidia`/`nvidiaModel` below). Fast
+// enough for a single prompt-refine turn; the rest of the free chain still
+// backs it up if the NIM lane is down.
+const NVIDIA_NEMOTRON_MODEL = 'nvidia/nvidia-nemotron-nano-9b-v2';
const ANTHROPIC_MODEL = 'claude-haiku-4-5-20251001';
// Paid last-resort tail (see policy above). Mini keeps the backstop cheap; the
// repo-wide OpenAI default (api/_lib/chat-models.js) uses the same model.
@@ -137,8 +142,22 @@ function openaiCompatProvider({ name, key, url, model, extraHeaders = {} }) {
// free provider: the prod paid keys are routinely invalid or out of quota, so
// platform spend never leads and nothing depends on it — but when a key does
// work, a request that exhausted the free tier still succeeds.
-function providerChain({ anthropicKey, anthropicModel } = {}) {
+function providerChain({ anthropicKey, anthropicModel, preferNvidia = false, nvidiaModel = null } = {}) {
const chain = [];
+ // Opt-in: lead with the NVIDIA NIM lane on a chosen Nemotron model. Used by
+ // features that want the NVIDIA-native model to actually produce the result
+ // (not just sit at the tail of the free chain). The remaining free providers
+ // are still appended below as fallback, so the feature degrades gracefully
+ // when the NIM lane is unreachable. NVIDIA is free, so this respects the
+ // free-first policy — it just reorders which free provider leads.
+ if (preferNvidia && env.NVIDIA_API_KEY) {
+ chain.push(openaiCompatProvider({
+ name: 'nvidia',
+ key: env.NVIDIA_API_KEY,
+ url: 'https://integrate.api.nvidia.com/v1/chat/completions',
+ model: nvidiaModel || NVIDIA_NEMOTRON_MODEL,
+ }));
+ }
if (anthropicKey) chain.push(anthropicProvider(anthropicKey, anthropicModel));
if (env.GROQ_API_KEY) {
chain.push(openaiCompatProvider({
@@ -213,8 +232,8 @@ export function llmConfigured(opts = {}) {
// { userId, agentId, avatarId, clientId, apiKeyId, tool } — are all optional;
// pass whatever the call site knows. Recording is fire-and-forget (see
// recordEvent), so it never delays or fails the completion.
-export async function llmComplete({ system, user, maxTokens = 1024, anthropicKey = null, anthropicModel = null, timeoutMs = 30_000, track = null }) {
- const chain = providerChain({ anthropicKey, anthropicModel });
+export async function llmComplete({ system, user, maxTokens = 1024, anthropicKey = null, anthropicModel = null, preferNvidia = false, nvidiaModel = null, timeoutMs = 30_000, track = null }) {
+ const chain = providerChain({ anthropicKey, anthropicModel, preferNvidia, nvidiaModel });
if (!chain.length) throw new LlmUnavailableError();
// Per-user daily spend cap on platform-paid keys. Only runs when a userId is
diff --git a/api/forge-enhance.js b/api/forge-enhance.js
index 0017a7237..142adb7d7 100644
--- a/api/forge-enhance.js
+++ b/api/forge-enhance.js
@@ -58,12 +58,18 @@ export default wrap(async (req, res) => {
return error(res, 400, 'prompt_too_short', 'Describe the object in a few words first.');
}
+ // Opt-in: route the refine through NVIDIA's Nemotron NIM (the /forge-spark
+ // pipeline asks for this). It still falls back to the rest of the free chain
+ // when the NIM lane is down, so enhancement stays a boost, never a gate.
+ const preferNvidia = body?.engine === 'nemotron';
+
let result;
try {
result = await llmComplete({
system: SYSTEM,
user: raw.slice(0, MAX_IN),
maxTokens: 160,
+ preferNvidia,
track: { tool: 'forge-enhance', clientId: clientIp(req) },
});
} catch (err) {
@@ -81,5 +87,5 @@ export default wrap(async (req, res) => {
// rather than hand back something useless.
if (prompt.length < 3) prompt = raw;
- return json(res, 200, { prompt, original: raw, provider: result.provider });
+ return json(res, 200, { prompt, original: raw, provider: result.provider, model: result.model });
});
diff --git a/data/pages.json b/data/pages.json
index b302ba2c4..54b83eea7 100644
--- a/data/pages.json
+++ b/data/pages.json
@@ -273,6 +273,14 @@
"changefreq": "monthly",
"added": "2026-06-23"
},
+ {
+ "path": "/forge-spark",
+ "title": "Text → 3D — Nemotron → FLUX → TRELLIS",
+ "description": "Describe an object and watch it become a textured 3D mesh: Nemotron sharpens the prompt, FLUX paints a clean reference, and TRELLIS reconstructs the model — served on NVIDIA NIM, quiet and always on.",
+ "priority": 0.7,
+ "changefreq": "monthly",
+ "added": "2026-06-23"
+ },
{
"path": "/forge-studio",
"title": "Studio — Object + Avatar from text",
diff --git a/pages/forge-spark.html b/pages/forge-spark.html
new file mode 100644
index 000000000..05b3b7548
--- /dev/null
+++ b/pages/forge-spark.html
@@ -0,0 +1,582 @@
+<!doctype html>
+<html lang="en">
+ <head>
+ <script>/* three.ws theme boot — no-flash; runtime in /theme-switcher.js */(function(){try{var m=localStorage.getItem('twx_theme');var l=m==='auto'?(window.matchMedia&&window.matchMedia('(prefers-color-scheme: light)').matches):m==='light';document.documentElement.setAttribute('data-theme',l?'light':'dark');}catch(e){document.documentElement.setAttribute('data-theme','dark');}})();</script>
+ <meta charset="UTF-8" />
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
+ <title>Text → 3D · Nemotron → FLUX → TRELLIS · three.ws</title>
+ <meta
+ name="description"
+ content="Describe an object and watch it become a textured 3D mesh. Nemotron sharpens the prompt, FLUX paints a reference image, and TRELLIS reconstructs the model — served on NVIDIA NIM."
+ />
+ <meta property="og:title" content="Text → 3D — Nemotron → FLUX → TRELLIS · three.ws" />
+ <meta
+ property="og:description"
+ content="Describe it. Nemotron sharpens the words, FLUX paints a clean reference, TRELLIS reconstructs the mesh. Served on NVIDIA NIM, quiet and always on."
+ />
+ <meta property="og:type" content="website" />
+ <meta property="og:site_name" content="three.ws" />
+ <meta property="og:url" content="https://three.ws/forge-spark" />
+ <meta property="og:image" content="https://three.ws/api/page-og?s=build&amp;t=Text+%E2%86%92+3D+%E2%80%94+Nemotron+%E2%86%92+FLUX+%E2%86%92+TRELLIS&amp;d=Describe+an+object.+Nemotron+sharpens+the+prompt%2C+FLUX+paints+a+reference%2C+TRELLIS+reconstructs+the+textured+mesh+%E2%80%94+served+on+NVIDIA+NIM.&amp;p=%2Fforge-spark" />
+ <meta property="og:image:width" content="1200" />
+ <meta property="og:image:height" content="630" />
+ <meta name="twitter:card" content="summary_large_image" />
+ <meta name="twitter:site" content="@trythreews" />
+ <meta name="twitter:title" content="Text → 3D · Nemotron → FLUX → TRELLIS · three.ws" />
+ <meta
+ name="twitter:description"
+ content="Describe it. Nemotron sharpens the words, FLUX paints a reference, TRELLIS reconstructs the mesh. Served on NVIDIA NIM."
+ />
+ <meta name="twitter:image" content="https://three.ws/api/page-og?s=build&amp;t=Text+%E2%86%92+3D+%E2%80%94+Nemotron+%E2%86%92+FLUX+%E2%86%92+TRELLIS&amp;d=Describe+an+object.+Nemotron+sharpens+the+prompt%2C+FLUX+paints+a+reference%2C+TRELLIS+reconstructs+the+textured+mesh+%E2%80%94+served+on+NVIDIA+NIM.&amp;p=%2Fforge-spark" />
+ <meta name="theme-color" content="#080814" />
+ <link rel="icon" href="/favicon.ico" sizes="any" />
+ <link rel="icon" type="image/svg+xml" href="/favicon.svg" />
+ <link rel="apple-touch-icon" href="/apple-touch-icon.png" />
+ <link rel="manifest" href="/site.webmanifest" />
+ <link rel="canonical" href="https://three.ws/forge-spark" />
+ <link rel="stylesheet" href="/style.css" />
+ <script
+ type="module"
+ src="https://ajax.googleapis.com/ajax/libs/model-viewer/4.0.0/model-viewer.min.js"
+ integrity="sha384-sr9b4Ux0WhAUGclJ0ym0FSY2zSOMmNSn0bP/SA0e6bNCrpn/5W3QL8mm+LdlQMKw"
+ crossorigin="anonymous"
+ ></script>
+ <style>
+ .spark-main {
+ max-width: 1180px;
+ margin: 0 auto;
+ padding: var(--space-lg) clamp(var(--space-md), 4vw, var(--space-2xl)) var(--space-2xl);
+ }
+ /* Hero ------------------------------------------------------- */
+ .spark-hero {
+ text-align: center;
+ max-width: 660px;
+ margin: clamp(var(--space-lg), 5vw, var(--space-2xl)) auto var(--space-xl);
+ }
+ .spark-eyebrow {
+ display: inline-flex;
+ align-items: center;
+ gap: 0.5em;
+ font-size: 0.78rem;
+ letter-spacing: 0.08em;
+ text-transform: uppercase;
+ color: var(--text-muted, #8a8aa0);
+ border: 1px solid var(--border, #23233a);
+ border-radius: 999px;
+ padding: 0.35em 0.85em;
+ margin-bottom: var(--space-md);
+ }
+ .spark-eyebrow .dot {
+ width: 7px;
+ height: 7px;
+ border-radius: 50%;
+ background: #76e0a0;
+ box-shadow: 0 0 0 0 rgba(118, 224, 160, 0.6);
+ animation: spark-pulse 2.4s ease-out infinite;
+ }
+ @keyframes spark-pulse {
+ 0% { box-shadow: 0 0 0 0 rgba(118, 224, 160, 0.5); }
+ 70% { box-shadow: 0 0 0 8px rgba(118, 224, 160, 0); }
+ 100% { box-shadow: 0 0 0 0 rgba(118, 224, 160, 0); }
+ }
+ .spark-hero h1 {
+ font-size: clamp(1.9rem, 4.5vw, 2.9rem);
+ line-height: 1.08;
+ margin: 0 0 var(--space-sm);
+ letter-spacing: -0.02em;
+ }
+ .spark-hero p {
+ color: var(--text-muted, #9a9ab2);
+ font-size: 1.04rem;
+ line-height: 1.6;
+ margin: 0;
+ }
+ /* Workspace -------------------------------------------------- */
+ .spark-workspace {
+ display: grid;
+ grid-template-columns: minmax(0, 1fr);
+ gap: var(--space-xl);
+ align-items: start;
+ }
+ @media (min-width: 980px) {
+ .spark-workspace {
+ grid-template-columns: minmax(320px, 380px) minmax(0, 1fr);
+ }
+ }
+ .composer {
+ display: flex;
+ flex-direction: column;
+ gap: var(--space-md);
+ background: var(--surface, #11111c);
+ border: 1px solid var(--border, #23233a);
+ border-radius: var(--radius-lg, 16px);
+ padding: var(--space-lg);
+ }
+ .composer label {
+ font-weight: 600;
+ font-size: 0.95rem;
+ }
+ .composer textarea {
+ width: 100%;
+ min-height: 116px;
+ resize: vertical;
+ background: var(--bg, #08080f);
+ color: inherit;
+ border: 1px solid var(--border, #2a2a42);
+ border-radius: var(--radius, 12px);
+ padding: var(--space-md);
+ font: inherit;
+ line-height: 1.5;
+ transition: border-color 0.18s ease;
+ }
+ .composer textarea:focus {
+ outline: none;
+ border-color: var(--accent, #6c8cff);
+ }
+ .example-row {
+ display: flex;
+ flex-wrap: wrap;
+ gap: 0.5rem;
+ }
+ .chip {
+ font-size: 0.82rem;
+ color: var(--text-muted, #9a9ab2);
+ background: transparent;
+ border: 1px solid var(--border, #2a2a42);
+ border-radius: 999px;
+ padding: 0.35em 0.8em;
+ cursor: pointer;
+ transition: border-color 0.16s ease, color 0.16s ease, transform 0.16s ease;
+ }
+ .chip:hover { border-color: var(--accent, #6c8cff); color: var(--text, #eee); }
+ .chip:active { transform: translateY(1px); }
+ .chip:focus-visible { outline: 2px solid var(--accent, #6c8cff); outline-offset: 2px; }
+ .generate-btn {
+ appearance: none;
+ border: none;
+ border-radius: var(--radius, 12px);
+ padding: 0.85em 1.1em;
+ font: inherit;
+ font-weight: 650;
+ color: #07070f;
+ background: linear-gradient(135deg, #8ad0ff, #76e0a0);
+ cursor: pointer;
+ transition: filter 0.16s ease, transform 0.16s ease;
+ }
+ .generate-btn:hover { filter: brightness(1.06); }
+ .generate-btn:active { transform: translateY(1px); }
+ .generate-btn:disabled { opacity: 0.55; cursor: not-allowed; filter: none; }
+ .generate-btn:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
+ /* Pipeline stages -------------------------------------------- */
+ .pipeline {
+ list-style: none;
+ margin: 0;
+ padding: 0;
+ display: flex;
+ flex-direction: column;
+ gap: 0.55rem;
+ }
+ .stage {
+ display: grid;
+ grid-template-columns: 26px 1fr auto;
+ align-items: center;
+ gap: 0.7rem;
+ padding: 0.6rem 0.75rem;
+ border: 1px solid var(--border, #23233a);
+ border-radius: var(--radius, 12px);
+ color: var(--text-muted, #8a8aa0);
+ transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
+ }
+ .stage .num {
+ width: 26px; height: 26px;
+ display: grid; place-items: center;
+ border-radius: 50%;
+ border: 1px solid currentColor;
+ font-size: 0.78rem;
+ font-variant-numeric: tabular-nums;
+ }
+ .stage .who { font-weight: 600; color: var(--text, #e6e6f2); }
+ .stage .does { font-size: 0.82rem; }
+ .stage .state { font-size: 0.74rem; letter-spacing: 0.04em; text-transform: uppercase; opacity: 0.7; }
+ .stage[data-state='active'] {
+ border-color: var(--accent, #6c8cff);
+ background: color-mix(in srgb, var(--accent, #6c8cff) 8%, transparent);
+ color: var(--text, #e6e6f2);
+ }
+ .stage[data-state='active'] .num { animation: spark-spin 1s linear infinite; border-style: dashed; }
+ .stage[data-state='done'] { border-color: #76e0a0; color: var(--text, #e6e6f2); }
+ .stage[data-state='done'] .num { background: #76e0a0; color: #07070f; border-color: #76e0a0; }
+ @keyframes spark-spin { to { transform: rotate(360deg); } }
+ /* Viewer ----------------------------------------------------- */
+ .stage-block { display: flex; flex-direction: column; gap: var(--space-md); }
+ .viewer-shell {
+ position: relative;
+ aspect-ratio: 1 / 1;
+ width: 100%;
+ border: 1px solid var(--border, #23233a);
+ border-radius: var(--radius-lg, 16px);
+ overflow: hidden;
+ background:
+ radial-gradient(120% 90% at 50% 0%, color-mix(in srgb, var(--accent, #6c8cff) 10%, transparent), transparent 60%),
+ var(--surface, #0d0d18);
+ display: grid;
+ place-items: center;
+ }
+ .viewer-shell model-viewer { width: 100%; height: 100%; --poster-color: transparent; }
+ .viewer-empty {
+ text-align: center;
+ color: var(--text-muted, #8a8aa0);
+ padding: var(--space-lg);
+ max-width: 320px;
+ }
+ .viewer-empty svg { opacity: 0.5; margin-bottom: var(--space-sm); }
+ .viewer-status {
+ position: absolute;
+ inset: auto 0 0 0;
+ padding: 0.7rem 1rem;
+ font-size: 0.85rem;
+ color: var(--text, #e6e6f2);
+ background: linear-gradient(0deg, color-mix(in srgb, var(--bg, #08080f) 88%, transparent), transparent);
+ display: flex;
+ align-items: center;
+ gap: 0.55rem;
+ }
+ .viewer-status .spinner {
+ width: 14px; height: 14px; border-radius: 50%;
+ border: 2px solid color-mix(in srgb, var(--accent, #6c8cff) 35%, transparent);
+ border-top-color: var(--accent, #6c8cff);
+ animation: spark-spin 0.8s linear infinite;
+ }
+ .viewer-actions { display: flex; gap: 0.6rem; flex-wrap: wrap; }
+ .viewer-actions a, .viewer-actions button {
+ font: inherit; font-size: 0.88rem;
+ text-decoration: none;
+ color: var(--text, #e6e6f2);
+ border: 1px solid var(--border, #2a2a42);
+ border-radius: 999px;
+ padding: 0.45em 0.95em;
+ background: transparent;
+ cursor: pointer;
+ transition: border-color 0.16s ease;
+ }
+ .viewer-actions a:hover, .viewer-actions button:hover { border-color: var(--accent, #6c8cff); }
+ .error-note {
+ color: #ff9a9a;
+ font-size: 0.88rem;
+ border: 1px solid color-mix(in srgb, #ff6b6b 40%, transparent);
+ background: color-mix(in srgb, #ff6b6b 8%, transparent);
+ border-radius: var(--radius, 12px);
+ padding: 0.7rem 0.9rem;
+ }
+ .refined {
+ font-size: 0.86rem;
+ color: var(--text-muted, #9a9ab2);
+ border-left: 2px solid var(--accent, #6c8cff);
+ padding: 0.2rem 0 0.2rem 0.75rem;
+ line-height: 1.5;
+ }
+ .refined b { color: var(--text, #e6e6f2); font-weight: 600; }
+ .refined .by { font-size: 0.74rem; opacity: 0.7; display: block; margin-top: 0.25rem; }
+ .spark-footer {
+ margin-top: var(--space-2xl);
+ text-align: center;
+ color: var(--text-muted, #7a7a92);
+ font-size: 0.85rem;
+ line-height: 1.6;
+ }
+ .spark-footer a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
+ .visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
+ </style>
+ </head>
+ <body class="forge-page">
+ <div id="nav-container"></div>
+
+ <main class="spark-main">
+ <header class="spark-hero">
+ <span class="spark-eyebrow"><span class="dot"></span> Text → 3D · served on NVIDIA NIM</span>
+ <h1>Describe it. Hold it.</h1>
+ <p>
+ A sentence becomes a textured 3D mesh. Nemotron sharpens your words, FLUX paints a clean
+ reference, and TRELLIS reconstructs the model — quietly, on NVIDIA NIM.
+ </p>
+ </header>
+
+ <div class="spark-workspace">
+ <!-- Composer -->
+ <form class="composer" id="composer" autocomplete="off">
+ <label for="prompt">What should we build?</label>
+ <textarea
+ id="prompt"
+ placeholder="a worn brass pocket watch, half-open, resting on its side"
+ maxlength="400"
+ required
+ ></textarea>
+ <div class="example-row" id="examples" aria-label="Example prompts">
+ <button type="button" class="chip" data-fill="a worn brass pocket watch, half-open">brass pocket watch</button>
+ <button type="button" class="chip" data-fill="a glazed ceramic teapot with a bamboo handle">ceramic teapot</button>
+ <button type="button" class="chip" data-fill="a vintage film camera, matte black body">film camera</button>
+ <button type="button" class="chip" data-fill="a potted monstera plant in a terracotta pot">potted monstera</button>
+ </div>
+ <button type="submit" class="generate-btn" id="generate">Generate 3D model</button>
+ <div id="refined" class="refined" hidden></div>
+ </form>
+
+ <!-- Pipeline + viewer -->
+ <div class="stage-block">
+ <ol class="pipeline" id="pipeline">
+ <li class="stage" data-stage="nemotron" data-state="idle">
+ <span class="num">1</span>
+ <span><span class="who">Nemotron</span><br /><span class="does">refines your prompt</span></span>
+ <span class="state">idle</span>
+ </li>
+ <li class="stage" data-stage="flux" data-state="idle">
+ <span class="num">2</span>
+ <span><span class="who">FLUX</span><br /><span class="does">paints a reference image</span></span>
+ <span class="state">idle</span>
+ </li>
+ <li class="stage" data-stage="trellis" data-state="idle">
+ <span class="num">3</span>
+ <span><span class="who">TRELLIS</span><br /><span class="does">reconstructs the 3D mesh</span></span>
+ <span class="state">idle</span>
+ </li>
+ </ol>
+
+ <div class="viewer-shell" id="viewer-shell">
+ <div class="viewer-empty" id="viewer-empty">
+ <svg width="42" height="42" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.4" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
+ <path d="M12 2 2 7l10 5 10-5-10-5Z" />
+ <path d="m2 17 10 5 10-5" />
+ <path d="m2 12 10 5 10-5" />
+ </svg>
+ <p>Your model will appear here. Describe an object and hit generate — then orbit, light, and download the GLB.</p>
+ </div>
+ <div class="viewer-status" id="viewer-status" hidden>
+ <span class="spinner"></span>
+ <span id="viewer-status-text">Working…</span>
+ </div>
+ </div>
+
+ <div class="error-note" id="error" hidden></div>
+
+ <div class="viewer-actions" id="actions" hidden>
+ <a id="download" href="#" download>Download GLB</a>
+ <button type="button" id="again">Generate another</button>
+ </div>
+ </div>
+ </div>
+
+ <footer class="spark-footer">
+ The same TRELLIS NIM runs across lanes — local and cloud — so reconstruction stays
+ <b>always on</b>. Image → 3D lives at <a href="/forge-nim">/forge-nim</a>; the full studio at
+ <a href="/forge">/forge</a>.
+ </footer>
+ </main>
+
+ <script src="/nav.js" defer></script>
+ <script type="module" src="/model-viewer-meshopt.js"></script>
+ <script type="module">
+ const form = document.getElementById('composer');
+ const promptEl = document.getElementById('prompt');
+ const generateBtn = document.getElementById('generate');
+ const refinedEl = document.getElementById('refined');
+ const shell = document.getElementById('viewer-shell');
+ const emptyEl = document.getElementById('viewer-empty');
+ const statusEl = document.getElementById('viewer-status');
+ const statusText = document.getElementById('viewer-status-text');
+ const errorEl = document.getElementById('error');
+ const actions = document.getElementById('actions');
+ const download = document.getElementById('download');
+ const again = document.getElementById('again');
+ const stages = {
+ nemotron: document.querySelector('[data-stage="nemotron"]'),
+ flux: document.querySelector('[data-stage="flux"]'),
+ trellis: document.querySelector('[data-stage="trellis"]'),
+ };
+ let viewer = null;
+ let busy = false;
+
+ document.getElementById('examples').addEventListener('click', (e) => {
+ const chip = e.target.closest('.chip');
+ if (!chip) return;
+ promptEl.value = chip.dataset.fill;
+ promptEl.focus();
+ });
+
+ function setStage(name, state, label) {
+ const el = stages[name];
+ if (!el) return;
+ el.dataset.state = state;
+ const s = el.querySelector('.state');
+ if (s) s.textContent = label || state;
+ }
+ function resetStages() {
+ for (const name of Object.keys(stages)) setStage(name, 'idle', 'idle');
+ }
+ function showStatus(text) {
+ statusText.textContent = text;
+ statusEl.hidden = false;
+ }
+ function hideStatus() { statusEl.hidden = true; }
+ function showError(msg) {
+ errorEl.textContent = msg;
+ errorEl.hidden = false;
+ }
+ function clearError() { errorEl.hidden = true; errorEl.textContent = ''; }
+
+ function renderModel(url) {
+ if (!viewer) {
+ viewer = document.createElement('model-viewer');
+ viewer.setAttribute('camera-controls', '');
+ viewer.setAttribute('auto-rotate', '');
+ viewer.setAttribute('shadow-intensity', '1');
+ viewer.setAttribute('exposure', '1');
+ viewer.setAttribute('environment-image', 'neutral');
+ viewer.setAttribute('ar', '');
+ viewer.setAttribute('alt', 'Generated 3D model');
+ shell.appendChild(viewer);
+ }
+ viewer.src = url;
+ emptyEl.hidden = true;
+ download.href = url;
+ actions.hidden = false;
+ }
+
+ // Step 1 — Nemotron refines the prompt. Enhancement is a boost, never a
+ // gate: if the lane is unavailable we keep the user's own words.
+ async function refinePrompt(raw) {
+ setStage('nemotron', 'active', 'refining');
+ showStatus('Nemotron is sharpening your prompt…');
+ try {
+ const r = await fetch('/api/forge-enhance', {
+ method: 'POST',
+ headers: { 'content-type': 'application/json' },
+ body: JSON.stringify({ prompt: raw, engine: 'nemotron' }),
+ });
+ if (!r.ok) throw new Error('enhance ' + r.status);
+ const data = await r.json();
+ const refined = (data.prompt || raw).trim();
+ const model = data.model || 'Nemotron';
+ refinedEl.hidden = false;
+ refinedEl.innerHTML =
+ '<b>Refined prompt</b> · ' + escapeHtml(refined) +
+ '<span class="by">refined with ' + escapeHtml(prettyModel(model, data.provider)) + '</span>';
+ setStage('nemotron', 'done', 'done');
+ return refined;
+ } catch (err) {
+ // Quiet fallback — keep the original prompt, mark the stage done.
+ refinedEl.hidden = false;
+ refinedEl.innerHTML = '<b>Using your prompt as written.</b><span class="by">refine step unavailable — generating anyway</span>';
+ setStage('nemotron', 'done', 'skipped');
+ return raw;
+ }
+ }
+
+ // Steps 2 + 3 — FLUX paints a reference, TRELLIS reconstructs. /api/forge
+ // returns a finished glb_url synchronously, or a job to poll.
+ async function generateMesh(prompt) {
+ setStage('flux', 'active', 'painting');
+ showStatus('FLUX is painting a reference image…');
+ const r = await fetch('/api/forge', {
+ method: 'POST',
+ headers: { 'content-type': 'application/json' },
+ body: JSON.stringify({ prompt, path: 'image' }),
+ });
+ const data = await r.json().catch(() => ({}));
+ if (!r.ok) {
+ throw new Error(data.message || data.error || ('forge ' + r.status));
+ }
+ if (data.status === 'done' && (data.glb_url || data.model_url)) {
+ markReconstructDone();
+ return data.glb_url || data.model_url;
+ }
+ const jobId = data.job_id;
+ if (!jobId) throw new Error('No model and no job returned.');
+ // The reference is painted; move into reconstruction while we poll.
+ setStage('flux', 'done', 'done');
+ setStage('trellis', 'active', 'reconstructing');
+ showStatus('TRELLIS is reconstructing the mesh…');
+ return pollJob(jobId);
+ }
+
+ function markReconstructDone() {
+ setStage('flux', 'done', 'done');
+ setStage('trellis', 'done', 'done');
+ }
+
+ async function pollJob(jobId) {
+ const deadline = Date.now() + 210_000; // generous ceiling for a cold lane
+ while (Date.now() < deadline) {
+ await sleep(2500);
+ let data;
+ try {
+ const r = await fetch('/api/forge?job=' + encodeURIComponent(jobId), {
+ headers: { accept: 'application/json' },
+ });
+ data = await r.json();
+ } catch {
+ continue; // transient network blip — keep polling
+ }
+ const status = data.status;
+ if (status === 'done' && (data.glb_url || data.model_url)) {
+ markReconstructDone();
+ return data.glb_url || data.model_url;
+ }
+ if (status === 'failed' || status === 'error') {
+ throw new Error(data.error || 'Reconstruction failed.');
+ }
+ // running / queued — keep waiting
+ }
+ throw new Error('This is taking longer than usual. Please try again.');
+ }
+
+ form.addEventListener('submit', async (e) => {
+ e.preventDefault();
+ if (busy) return;
+ const raw = promptEl.value.trim();
+ if (raw.length < 3) { promptEl.focus(); return; }
+
+ busy = true;
+ generateBtn.disabled = true;
+ generateBtn.textContent = 'Generating…';
+ clearError();
+ actions.hidden = true;
+ resetStages();
+
+ try {
+ const refined = await refinePrompt(raw);
+ const url = await generateMesh(refined);
+ hideStatus();
+ renderModel(url);
+ } catch (err) {
+ hideStatus();
+ // Mark whichever stage was active as failed.
+ for (const name of Object.keys(stages)) {
+ if (stages[name].dataset.state === 'active') setStage(name, 'idle', 'failed');
+ }
+ showError(err.message || 'Something went wrong. Please try again.');
+ } finally {
+ busy = false;
+ generateBtn.disabled = false;
+ generateBtn.textContent = 'Generate 3D model';
+ }
+ });
+
+ again.addEventListener('click', () => {
+ promptEl.focus();
+ promptEl.select();
+ });
+
+ function sleep(ms) { return new Promise((r) => setTimeout(r, ms)); }
+ function escapeHtml(s) {
+ return String(s).replace(/[&<>"']/g, (c) => ({ '&': '&amp;', '<': '&lt;', '>': '&gt;', '"': '&quot;', "'": '&#39;' }[c]));
+ }
+ function prettyModel(model, provider) {
+ const m = String(model || '').toLowerCase();
+ if (m.includes('nemotron')) return 'Nemotron (NVIDIA NIM)';
+ if (provider === 'nvidia') return model + ' (NVIDIA NIM)';
+ if (provider) return model + ' · ' + provider;
+ return model;
+ }
+ </script>
+ </body>
+</html>
diff --git a/public/changelog.json b/public/changelog.json
index 5fd6b4a6a..a73cdb5a2 100644
--- a/public/changelog.json
+++ b/public/changelog.json
@@ -1,5 +1,5 @@
{
- "generated_at": "2026-06-23T16:04:11.083Z",
+ "generated_at": "2026-06-23T20:22:03.052Z",
"generated_by": "scripts/build-page-index.mjs from data/pages.json + data/changelog.json",
"site": {
"name": "three.ws",
@@ -256,6 +256,16 @@
"launch"
]
},
+ {
+ "date": "2026-06-23",
+ "type": "launch",
+ "title": "Text → 3D — Nemotron → FLUX → TRELLIS",
+ "summary": "Describe an object and watch it become a textured 3D mesh: Nemotron sharpens the prompt, FLUX paints a clean reference, and TRELLIS reconstructs the model — served on NVIDIA NIM, quiet and always on.",
+ "link": "/forge-spark",
+ "tags": [
+ "launch"
+ ]
+ },
{
"date": "2026-06-23",
"type": "launch",
diff --git a/public/changelog.xml b/public/changelog.xml
index af50496b5..595138f90 100644
--- a/public/changelog.xml
+++ b/public/changelog.xml
@@ -206,6 +206,14 @@
<category>launch</category>
<description>A marketplace of how agents trade: ownable, forkable, leaderboard-ranked trade strategies your agent can equip and run on-chain within your spend policy.</description>
</item>
+ <item>
+ <title>Text → 3D — Nemotron → FLUX → TRELLIS</title>
+ <link>https://three.ws/forge-spark</link>
+ <guid isPermaLink="false">2026-06-23:Text → 3D — Nemotron → FLUX → TRELLIS</guid>
+ <pubDate>Tue, 23 Jun 2026 12:00:00 GMT</pubDate>
+ <category>launch</category>
+ <description>Describe an object and watch it become a textured 3D mesh: Nemotron sharpens the prompt, FLUX paints a clean reference, and TRELLIS reconstructs the model — served on NVIDIA NIM, quiet and always on.</description>
+ </item>
<item>
<title>The AGI — narrow by design</title>
<link>https://three.ws/agi</link>
diff --git a/public/features.json b/public/features.json
index dbb9115d1..6e8944112 100644
--- a/public/features.json
+++ b/public/features.json
@@ -1,5 +1,5 @@
{
- "generated_at": "2026-06-23T16:04:11.070Z",
+ "generated_at": "2026-06-23T20:22:03.035Z",
"generated_by": "scripts/build-page-index.mjs from data/pages.json",
"site": {
"name": "three.ws",
@@ -332,6 +332,16 @@
"tags": [],
"showcase": false
},
+ {
+ "path": "/forge-spark",
+ "title": "Text → 3D — Nemotron → FLUX → TRELLIS",
+ "description": "Describe an object and watch it become a textured 3D mesh: Nemotron sharpens the prompt, FLUX paints a clean reference, and TRELLIS reconstructs the model — served on NVIDIA NIM, quiet and always on.",
+ "added": "2026-06-23",
+ "auth": null,
+ "indexable": true,
+ "tags": [],
+ "showcase": false
+ },
{
"path": "/forge-studio",
"title": "Studio — Object + Avatar from text",
diff --git a/public/llms-full.txt b/public/llms-full.txt
index 77e523e1b..8abd54400 100644
--- a/public/llms-full.txt
+++ b/public/llms-full.txt
@@ -206,6 +206,12 @@ URL: https://three.ws/forge-nim
Drive a self-hosted TRELLIS NIM (nvcr.io/nim/microsoft/trellis) directly: drop a photo, hit /v1/infer, and get the textured GLB back synchronously as base64 — rendered live and downloadable.
+### Text → 3D — Nemotron → FLUX → TRELLIS
+
+URL: https://three.ws/forge-spark
+
+Describe an object and watch it become a textured 3D mesh: Nemotron sharpens the prompt, FLUX paints a clean reference, and TRELLIS reconstructs the model — served on NVIDIA NIM, quiet and always on.
+
### Studio — Object + Avatar from text
URL: https://three.ws/forge-studio
diff --git a/public/llms.txt b/public/llms.txt
index 31d768e4c..d22b967fd 100644
--- a/public/llms.txt
+++ b/public/llms.txt
@@ -45,6 +45,7 @@ Create and customize an agent.
- [Describe it to 3D](https://three.ws/create/prompt): Type a description. About a minute later: a rigged 3D avatar you can animate and download.
- [Forge — Text to 3D](https://three.ws/forge): Type a prompt — or drop in photos or a sketch — and get a downloadable textured 3D model (GLB). Pick from multiple generation engines with live health status.
- [Forge · NIM — Self-Hosted Image to 3D](https://three.ws/forge-nim): Drive a self-hosted TRELLIS NIM (nvcr.io/nim/microsoft/trellis) directly: drop a photo, hit /v1/infer, and get the textured GLB back synchronously as base64 — rendered live and downloadable.
+- [Text → 3D — Nemotron → FLUX → TRELLIS](https://three.ws/forge-spark): Describe an object and watch it become a textured 3D mesh: Nemotron sharpens the prompt, FLUX paints a clean reference, and TRELLIS reconstructs the model — served on NVIDIA NIM, quiet and always on.
- [Studio — Object + Avatar from text](https://three.ws/forge-studio): One canvas for both text-to-3D pipelines: forge a textured object (GLB) in the Object tab, or describe a character and get a rigged avatar in the Avatar tab.
- [Cosmos — Living Worlds](https://three.ws/cosmos): Bring your avatar to life: type a world and NVIDIA Cosmos renders a living, photoreal scene that plays behind your 3D avatar. Generate, preview, and download a short cinematic clip.
- [Scene Studio](https://three.ws/scene): Full 3D scene editor in the browser — import GLB models, arrange them with transform gizmos, edit materials and lights, and export complete scenes.
diff --git a/public/sitemap/index.html b/public/sitemap/index.html
index 0799f67e5..288872f45 100644
--- a/public/sitemap/index.html
+++ b/public/sitemap/index.html
@@ -65,7 +65,7 @@
<main class="sm-wrap">
<div class="sm-hero">
<h1>Sitemap</h1>
- <p>All 334 pages on three.ws, grouped by purpose. Looking for the machine-readable versions?</p>
+ <p>All 335 pages on three.ws, grouped by purpose. Looking for the machine-readable versions?</p>
<div class="sm-formats">
<a href="/sitemap.xml"><code>sitemap.xml</code> · for search engines</a>
<a href="/llms.txt"><code>llms.txt</code> · for AI agents</a>
@@ -77,7 +77,7 @@
</div>
<div class="sm-filter">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" aria-hidden="true"><circle cx="11" cy="11" r="7"/><path d="m21 21-4.3-4.3"/></svg>
- <input id="sm-filter-input" type="search" placeholder="Filter 334 pages by name, path, or description…" aria-label="Filter pages" autocomplete="off" spellcheck="false" />
+ <input id="sm-filter-input" type="search" placeholder="Filter 335 pages by name, path, or description…" aria-label="Filter pages" autocomplete="off" spellcheck="false" />
<kbd aria-hidden="true">/</kbd>
</div>
<p class="sm-filter-count" id="sm-filter-count" role="status" aria-live="polite"></p>
@@ -252,7 +252,7 @@
<section class="sm-section" id="build">
<header>
- <h2>Build<span class="sm-count" data-count>38</span></h2>
+ <h2>Build<span class="sm-count" data-count>39</span></h2>
<p class="sm-section-desc">Create and customize an agent.</p>
</header>
<ul class="sm-list">
@@ -326,6 +326,13 @@
<span class="sm-desc">Drive a self-hosted TRELLIS NIM (nvcr.io/nim/microsoft/trellis) directly: drop a photo, hit /v1/infer, and get the textured GLB back synchronously as base64 — rendered live and downloadable.</span>
</a>
</li>
+ <li>
+ <a href="/forge-spark">
+ <span class="sm-title">Text → 3D — Nemotron → FLUX → TRELLIS</span>
+ <span class="sm-path">/forge-spark</span>
+ <span class="sm-desc">Describe an object and watch it become a textured 3D mesh: Nemotron sharpens the prompt, FLUX paints a clean reference, and TRELLIS reconstructs the model — served on NVIDIA NIM, quiet and always on.</span>
+ </a>
+ </li>
<li>
<a href="/forge-studio">
<span class="sm-title">Studio — Object + Avatar from text</span>
diff --git a/tests/api/llm.test.js b/tests/api/llm.test.js
index b27b9441a..4ef467b8a 100644
--- a/tests/api/llm.test.js
+++ b/tests/api/llm.test.js
@@ -121,6 +121,35 @@ describe('llmComplete — free platform providers', () => {
const nvidiaCall = calls.find((c) => c.url.includes(NVIDIA_HOST));
expect(nvidiaCall.headers.authorization).toBe('Bearer nvapi-x');
});
+
+ it('preferNvidia leads with the Nemotron NIM before Groq', async () => {
+ process.env.GROQ_API_KEY = 'g';
+ process.env.NVIDIA_API_KEY = 'nvapi-x';
+ const calls = installFetch({
+ [NVIDIA_HOST]: openaiShape('from nemotron'),
+ [GROQ_HOST]: openaiShape('from groq'),
+ });
+ const out = await llm.llmComplete({ system: 's', user: 'u', preferNvidia: true });
+ expect(out.provider).toBe('nvidia');
+ expect(out.text).toBe('from nemotron');
+ expect(out.model).toBe('nvidia/nvidia-nemotron-nano-9b-v2');
+ // NVIDIA was hit first; Groq never needed.
+ expect(calls[0].url).toContain(NVIDIA_HOST);
+ expect(calls.some((c) => c.url.includes(GROQ_HOST))).toBe(false);
+ });
+
+ it('preferNvidia still falls back to Groq when the NIM lane errors', async () => {
+ process.env.GROQ_API_KEY = 'g';
+ process.env.NVIDIA_API_KEY = 'nvapi-x';
+ const calls = installFetch({
+ [NVIDIA_HOST]: errResp(503),
+ [GROQ_HOST]: openaiShape('from groq'),
+ });
+ const out = await llm.llmComplete({ system: 's', user: 'u', preferNvidia: true });
+ expect(out.provider).toBe('groq');
+ expect(out.text).toBe('from groq');
+ expect(calls[0].url).toContain(NVIDIA_HOST);
+ });
});
describe('llmComplete — multiple OpenRouter keys', () => {
diff --git a/vite.config.js b/vite.config.js
index 7826daa5f..3ea80bf5b 100644
--- a/vite.config.js
+++ b/vite.config.js
@@ -317,6 +317,7 @@ const appConfig = {
forge: resolve(__dirname, 'pages/forge.html'),
'nim-forge': resolve(__dirname, 'pages/nim-forge.html'),
'forge-nim': resolve(__dirname, 'pages/forge-nim.html'),
+ 'forge-spark': resolve(__dirname, 'pages/forge-spark.html'),
dad: resolve(__dirname, 'pages/dad.html'),
'forge-studio': resolve(__dirname, 'pages/forge-studio.html'),
'forge-embed': resolve(__dirname, 'pages/forge-embed.html'),