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.

fix(x402): stop a variable-price endpoint selling at a flat $THREE amount

nirholasf82521420347
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 9b36a8d46..41e57a6d7 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -24,6 +24,7 @@ Public history for [three.ws](https://three.ws), newest first. New pages come fr
- **Fact checks stop saying "not enough evidence" when the evidence was there**: A fact check reads five sources and asks a language model where each one stands on the claim. When that model answered in a shape the reader could not parse, every source was quietly recorded as saying nothing, the check reported "not enough evidence", and nothing anywhere said the reading had failed. A live check on whether a tomato is a vegetable came back that way while holding the Supreme Court case that settles the question. The reader now copes with the formats models actually use, including the thinking-out-loud preamble and code fences it used to choke on, and it no longer stops at the first square bracket it sees. When a reply genuinely cannot be read, the check now says it was degraded instead of presenting a verdict it did not earn, which also keeps that answer out of the week-long cache and out of the published accuracy score. The same fault had been collapsing the three search angles behind each check down to one. (`/fact-checker`) `[fix, improvement]`
- **Fixed a footer link that led to a dead page**: The terminal page's footer offered an Avatars link that pointed at an address the site does not serve, so clicking it returned a 404 instead of the avatar gallery. It now opens the gallery, the same place every other page sends you. On the knock page, a placeholder link that sat empty until the profile finished loading was removed, so people navigating by keyboard or screen reader no longer land on a link with no name and nowhere to go. (`/tty`) `[fix]`
- **License terms for three.ws containers on NVIDIA NGC**: three.ws is preparing to publish its image-to-3D inference server in NVIDIA's NGC catalog, so the licence that will cover those container images is now public. It states plainly what you get: Apache-2.0 source, no model weights inside the image (you bring your own, under the upstream licence), and a container that carries no analytics or telemetry and sends nothing back to us. It sits alongside the other policies on the legal page. (`/legal/nvidia-ngc-eula`) `[docs]`
+- **Materialize checkout: buy a real print, or let an agent buy one**: You can now order a physical print of a model and pay for it. Quote the job, pick a material and a size, and checkout hands you a payment in USDC on Solana with the itemised price you were shown, never a recomputed one. Once the payment lands the order moves into safety screening on its own, and every step writes to a timeline you can read at any time. The same checkout is open to AI agents at /api/x402/print-order: an agent quotes the job, pays, and a real object is manufactured and shipped to a street address, with no account anywhere in the loop. Prices come from one catalog file and nothing else, a quote is signed so it cannot be altered on the way to checkout, and an order that was never going to be accepted is refused before anyone is charged. (`/materialize`) `[feature, sdk]`
- **Materialize will not print a weapon, a key to your door, or somebody else's brand**: Printing something is not like generating a picture of it. A refused image costs nobody anything; a printed firearm part is a crime in most of the places we ship to, and a working copy of a key is a burglary tool. So Materialize checks every order twice, and the rules are code rather than a polite request. It refuses firearm components, suppressors, ammunition and magazines, keys and lock picks, counterfeit goods and other people's brand marks, concealed and spring-loaded blades, drug paraphernalia, and realistic firearm likenesses at life size. The first check runs before you are ever asked to pay, so a refusal costs nothing, and it names the category, links the policy, and says what you can print instead. The second runs on the paid order on its way to the printer, and an order that fails it is refunded rather than quietly shipped. What this deliberately does not do is refuse the ordinary: a tabletop miniature carrying a weapon prints, a blunt prop sword prints, your own logo prints. Full policy is in the docs. (`/materialize`) `[feature, security]`
- **Materialize: your generation, printed and posted to you**: Everything the forge makes has lived on a screen. Materialize prints it and ships it. Point it at any model, yours or one from the gallery, and it measures the mesh first: whether it is a closed solid, how many separate pieces it is, where the holes are, how thin the thinnest wall gets, and its exact volume. That measurement is the price, so nothing is guessed. Pick a material and a height and you get an itemized quote, every line shown, in resin, tough resin, nylon, full-colour sandstone, draft plastic or stainless steel. Before it prints, the model is rebuilt as a watertight solid, its holes filled, scaled to the size you chose, and hollowed with drain holes if that saves you money. Full-colour prints carry the colour sampled from the model's own texture, which is what lets a printer reproduce what you see on screen. Checkout is USDC on Solana, holders get up to fifteen percent off, and you can follow the order from screening to production to the tracking number. An AI agent can order one too, over x402, with nobody in the loop: as far as we know that makes this the first API where an agent pays and a real object turns up at a real address. (`/materialize`) `[feature]`
- **Photo mode in the coin worlds now actually hands you the photo**: Press P in a coin world, or the camera button on the heads-up display, and you get a picture of the world on a share card: the scene itself, the three.ws mark, the coin you are standing in, and, during a live event, that event's name stamped on it. The card was there but the shutter went nowhere. Every single press answered "Couldn't photograph the world just now" and showed nothing, because of a fault in the code that builds the preview, so nobody has ever actually been handed one of these. Pressing it now opens the card, with Download and Copy image next to it. The picture is taken as a separate render rather than grabbed off the screen, so no panel, name tag or chat line is ever in the frame, and it works the same in zen mode, which is when most people will want it. It costs nothing when you are not using it: none of photo mode is loaded until the first press. Two smaller things fixed alongside: taking a second photo while the first card is open now replaces it cleanly instead of briefly stacking two sheets, where a click landing in the wrong moment could dismiss the shot you just took; and the line promising that P takes another one is true now, and visible, having previously rendered as nothing at all. Verified end to end in both Chrome and Safari, on a laptop frame and a phone frame, down to the pixels in the saved file, so the black rectangle that a mishandled 3D screenshot usually produces cannot come back unnoticed. (`/play`) `[fix, feature]`
diff --git a/api/_lib/x402-paid-endpoint.js b/api/_lib/x402-paid-endpoint.js
index 71aa5144a..a2bfde094 100644
--- a/api/_lib/x402-paid-endpoint.js
+++ b/api/_lib/x402-paid-endpoint.js
@@ -150,7 +150,7 @@ function buildAccept(network, priceAtomics, resourceUrl, payToOverride) {
throw new X402Error('unsupported_network', `paidEndpoint: unsupported network ${network}`, 500);
}
-function buildRequirements({ priceAtomics, networks, resourceUrl, payToOverride }) {
+function buildRequirements({ priceAtomics, networks, resourceUrl, payToOverride, acceptThree = true }) {
const out = [];
for (const name of networks) {
const net = resolveNetwork(name);
@@ -203,7 +203,13 @@ function buildRequirements({ priceAtomics, networks, resourceUrl, payToOverride
// above already confirmed solTo + fee payer + USDC mint — so holders can
// pay this endpoint in the platform token; the modal shows a token chooser.
// USDC stays first, so first-accept clients keep settling USDC.
- if (net === NETWORK_SOLANA_MAINNET && env.X402_ACCEPT_THREE_SOLANA) {
+ // `acceptThree: false` opts a route out. The $THREE amount is a FIXED
+ // env value, so on a route whose USDC price varies per request (a print
+ // order priced from its own quote token, a knock priced by the
+ // recipient's door) it would let a $40 good settle for a flat token
+ // amount. A fixed-price route is unaffected, which is why the default
+ // stays on.
+ if (acceptThree && net === NETWORK_SOLANA_MAINNET && env.X402_ACCEPT_THREE_SOLANA) {
out.push({
scheme: 'exact',
network: NETWORK_SOLANA_MAINNET,
@@ -325,6 +331,12 @@ export function paidEndpoint(spec) {
// Missing keys fall back to env so a single override doesn't disable
// the other networks.
payTo,
+ // Advertise the $THREE accept alongside USDC on Solana (default true,
+ // still gated on env.X402_ACCEPT_THREE_SOLANA). Set false on a route
+ // whose USDC price varies per request: the $THREE amount comes from a
+ // FIXED env value, so a variable-price good would be purchasable at a
+ // flat token price no matter what its USDC quote said.
+ acceptThree = true,
// Optional SIWX (Sign-In-With-X, CAIP-122) opt-in. See file header.
siwx,
// Optional post-settlement hook for per-job metering (Roadmap phase 4:
@@ -463,6 +475,7 @@ export function paidEndpoint(spec) {
networks,
resourceUrl,
payToOverride: payTo,
+ acceptThree,
});
} catch (err) {
return error(
diff --git a/api/x402/knock.js b/api/x402/knock.js
index 3cde71ba5..35b081713 100644
--- a/api/x402/knock.js
+++ b/api/x402/knock.js
@@ -177,6 +177,11 @@ export default async function handler(req, res) {
method: 'POST',
priceAtomics: String(door.price_atomics),
networks: networksFor(payout),
+ // This route's USDC price is per request, and the $THREE accept the rail
+ // adds alongside it carries a FIXED env amount. Advertising it here would
+ // let any order settle at that flat token price regardless of what it was
+ // quoted, so this route sells in USDC only.
+ acceptThree: false,
description: `${DESCRIPTION} Currently quoting: ${door.display_name || handle} at ${formatUsdc(door.price_atomics)}.`,
bazaar: BAZAAR,
service: withService({
diff --git a/api/x402/print-order.js b/api/x402/print-order.js
index ee7868b2f..da8550101 100644
--- a/api/x402/print-order.js
+++ b/api/x402/print-order.js
@@ -33,6 +33,7 @@ import { withService } from '../_lib/x402/bazaar-helpers.js';
import { cors, error, readBody } from '../_lib/http.js';
import { env } from '../_lib/env.js';
import { loadCatalog, verifyQuote } from '../_lib/print/quote.js';
+import { assertEditionAvailable, PrintEditionError } from '../_lib/print/editions.js';
import {
PrintStoreError,
createOrder,
@@ -211,6 +212,20 @@ export default async function handler(req, res) {
});
}
+ // Physical scarcity is part of pre-settle validation, not a surprise after
+ // the money lands: a limited edition whose last copy has shipped refuses the
+ // order for free, the same as a bad address does.
+ if (quote.creationId) {
+ try {
+ await assertEditionAvailable({ creationId: quote.creationId, quantity: quote.quantity || 1 });
+ } catch (err) {
+ if (err instanceof PrintEditionError) {
+ return error(res, 409, err.code, err.message);
+ }
+ throw err;
+ }
+ }
+
const priceAtomics = usdcAtomics(quote.total);
const note = typeof body.note === 'string' ? body.note.slice(0, 500) : null;
@@ -223,6 +238,11 @@ export default async function handler(req, res) {
// Solana leads and is the rail we settle ourselves. Base follows so an
// EVM-native agent can still buy a print.
networks: ['solana', 'base'],
+ // This route's USDC price is per request, and the $THREE accept the rail
+ // adds alongside it carries a FIXED env amount. Advertising it here would
+ // let any order settle at that flat token price regardless of what it was
+ // quoted, so this route sells in USDC only.
+ acceptThree: false,
description: `${DESCRIPTION} Currently quoting: ${quote.quantity} x ${quote.materialId} at ${quote.targetHeightMm} mm to ${quote.country}, ${Number(quote.total).toFixed(2)} USDC.`,
bazaar: BAZAAR,
service: withService({ serviceName: SERVICE_NAME, tags: TAGS }),
diff --git a/data/changelog.json b/data/changelog.json
index 7b7d033ad..137b6f663 100644
--- a/data/changelog.json
+++ b/data/changelog.json
@@ -25795,6 +25795,16 @@
"tags": [
"fix"
]
+ },
+ {
+ "date": "2026-09-02",
+ "title": "Materialize checkout: buy a real print, or let an agent buy one",
+ "summary": "You can now order a physical print of a model and pay for it. Quote the job, pick a material and a size, and checkout hands you a payment in USDC on Solana with the itemised price you were shown, never a recomputed one. Once the payment lands the order moves into safety screening on its own, and every step writes to a timeline you can read at any time. The same checkout is open to AI agents at /api/x402/print-order: an agent quotes the job, pays, and a real object is manufactured and shipped to a street address, with no account anywhere in the loop. Prices come from one catalog file and nothing else, a quote is signed so it cannot be altered on the way to checkout, and an order that was never going to be accepted is refused before anyone is charged.",
+ "tags": [
+ "feature",
+ "sdk"
+ ],
+ "link": "/materialize"
}
]
}
diff --git a/docs/api-reference.md b/docs/api-reference.md
index 9cd6f48a3..cadc2bed0 100644
--- a/docs/api-reference.md
+++ b/docs/api-reference.md
@@ -1927,14 +1927,57 @@ the post-repair report, so you can see exactly what changed.
### Order (human checkout)
```http
-POST /api/print/orders # session + CSRF
-GET /api/print/orders/:id # the order and its full timeline
+POST /api/print/orders # session + CSRF: open an order, get a payment intent
+GET /api/print/orders # your own orders, newest first
+GET /api/print/orders/:id # one order and its full timeline
+POST /api/print/orders/:id/confirm # session + CSRF: prove the USDC landed
```
Body: the quote `token` plus a `shipping` object (`name`, `line1`, `line2`,
`city`, `region`, `postal_code`, `country`, `phone`). Minimum fields only: this
is the sole personal data the platform stores for a print, it is never logged,
-and it never enters an analytics event.
+and it never enters an analytics event. `shipping.country` must match the
+country the quote was priced for, or the order is refused with a `422`
+(`destination_mismatch`): shipping is part of the signed total.
+
+Every priced field is re-derived from the token's HMAC, never read from the
+body, so an edited price is refused with `422 quote_invalid`. An expired token
+and a forged one fail identically.
+
+The response opens the order in `quoted` and hands back a Solana Pay intent:
+
+```json
+{
+ "order": { "id": "ea80b0a6-…", "status": "quoted", "price_usdc": "39.130000" },
+ "payment": {
+ "chain": "solana",
+ "recipient": "wwwww…crU",
+ "mint": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
+ "amount": "39.13",
+ "amount_atomics": "39130000",
+ "reference": "CZGB2JWpFfAcJPHfPfuSHKRgoneDQFP9ZGa72XASKLUG",
+ "url": "solana:wwwww…crU?spl-token=EPjFW…&amount=39.13&reference=CZGB…",
+ "confirm_url": "/api/print/orders/ea80b0a6-…/confirm"
+ }
+}
+```
+
+Pay it from any wallet with the `reference` attached, then call `confirm_url`.
+Pass `buyer_public_key` on the create call and the platform sponsors the network
+fee and pre-signs the transfer, so the buyer needs USDC and no SOL.
+
+Confirmation is a chain **read**: it finds the transaction carrying the order's
+reference and validates the mint, the recipient and the amount, then moves the
+order `paid` and on to `screening`. It never signs or sends anything.
+
+| Status | Meaning |
+| --- | --- |
+| `200` | Confirmed. Returns the order, the signature, and the updated timeline. |
+| `202` | `pending`: no payment carrying this reference has confirmed yet. Poll. |
+| `410` | `quote_expired`: the quote expired before it was paid. Re-quote. |
+| `422` | `payment_mismatch`: a transaction carried the reference but did not transfer the quoted USDC to the platform wallet. The signature is returned so you can inspect it. |
+
+USDC on Solana is the only way to pay. There is no card processor.
### Order (agent checkout, x402)
@@ -1966,7 +2009,10 @@ curl -s -X POST https://three.ws/api/x402/print-order \
}
```
-Track it with `GET /api/print/orders/:id`, which needs no account.
+An order is visible to the account that placed it, so `GET /api/print/orders/:id`
+needs that session; it answers `404` rather than `403` to anyone else, because
+confirming an id exists to a stranger is itself a leak. An agent order carries
+no session, so the `order_id` in the settled response is its receipt.
### Certificates
diff --git a/docs/x402-endpoints.md b/docs/x402-endpoints.md
index 21f0fe62e..38243c873 100644
--- a/docs/x402-endpoints.md
+++ b/docs/x402-endpoints.md
@@ -189,6 +189,7 @@ named in its description:
| `/api/x402/market-dex-volumes` | $0.001 | Top 100 DEXes by 24h volume, with 7d volume, WoW change, chains, and market-share. |
| `/api/x402/market-hacks` | $0.001 | Full DeFiLlama hack history — amount stolen, technique, chains, funds returned; searchable, with all-time/12mo loss stats. |
| `/api/x402/market-pulse` | $0.005 | Flagship one-call market bundle: global stats, Fear & Greed, top-10 coins, trending, ETH gas, DeFi TVL, stablecoin supply, DEX volume, protocol fees — each section degrades independently. |
+| `/api/x402/print-order` | from $12 | **Physical manufacturing.** Pay to have a 3D model printed in resin, nylon or full-colour sandstone and shipped to a street address. Quote free at `POST /api/print/quote`, then post that signed token plus an address: the 402 quotes that order's exact total, because every print is its own object. Settles into a real job with safety screening, tracked shipping and an on-chain certificate. |
Beneath the named endpoints sits the **datapoint fabric**: `/api/x402/d/<family>/…`
(one route, `api/x402/d/[...path].js`) serves 1,000,000+ individually priced
diff --git a/public/changelog.json b/public/changelog.json
index 514c00134..200c52bb7 100644
--- a/public/changelog.json
+++ b/public/changelog.json
@@ -1,5 +1,5 @@
{
- "generated_at": "2026-09-02T19:52:32.602Z",
+ "generated_at": "2026-09-02T19:56:14.359Z",
"generated_by": "scripts/build-page-index.mjs from data/pages.json + data/changelog.json",
"site": {
"name": "three.ws",
@@ -195,6 +195,17 @@
"docs"
]
},
+ {
+ "date": "2026-09-02",
+ "type": "update",
+ "title": "Materialize checkout: buy a real print, or let an agent buy one",
+ "summary": "You can now order a physical print of a model and pay for it. Quote the job, pick a material and a size, and checkout hands you a payment in USDC on Solana with the itemised price you were shown, never a recomputed one. Once the payment lands the order moves into safety screening on its own, and every step writes to a timeline you can read at any time. The same checkout is open to AI agents at /api/x402/print-order: an agent quotes the job, pays, and a real object is manufactured and shipped to a street address, with no account anywhere in the loop. Prices come from one catalog file and nothing else, a quote is signed so it cannot be altered on the way to checkout, and an order that was never going to be accepted is refused before anyone is charged.",
+ "link": "/materialize",
+ "tags": [
+ "feature",
+ "sdk"
+ ]
+ },
{
"date": "2026-09-02",
"type": "update",
diff --git a/public/changelog.xml b/public/changelog.xml
index 5d06dcc5b..243b93e66 100644
--- a/public/changelog.xml
+++ b/public/changelog.xml
@@ -150,6 +150,14 @@
<category>docs</category>
<description>three.ws is preparing to publish its image-to-3D inference server in NVIDIA's NGC catalog, so the licence that will cover those container images is now public. It states plainly what you get: Apache-2.0 source, no model weights inside the image (you bring your own, under the upstream licence), and a container that carries no analytics or telemetry and sends nothing back to us. It sits alongside the other policies on the legal page.</description>
</item>
+ <item>
+ <title>Materialize checkout: buy a real print, or let an agent buy one</title>
+ <link>https://three.ws/materialize</link>
+ <guid isPermaLink="false">2026-09-02:Materialize checkout: buy a real print, or let an agent buy one</guid>
+ <pubDate>Wed, 02 Sep 2026 12:00:00 GMT</pubDate>
+ <category>feature</category>
+ <description>You can now order a physical print of a model and pay for it. Quote the job, pick a material and a size, and checkout hands you a payment in USDC on Solana with the itemised price you were shown, never a recomputed one. Once the payment lands the order moves into safety screening on its own, and every step writes to a timeline you can read at any time. The same checkout is open to AI agents at /api/x402/print-order: an agent quotes the job, pays, and a real object is manufactured and shipped to a street address, with no account anywhere in the loop. Prices come from one catalog file and nothing else, a quote is signed so it cannot be altered on the way to checkout, and an order that was never going to be accepted is refused before anyone is charged.</description>
+ </item>
<item>
<title>Materialize will not print a weapon, a key to your door, or somebody else's brand</title>
<link>https://three.ws/materialize</link>
diff --git a/public/features.json b/public/features.json
index cfcf80e40..07e9acf27 100644
--- a/public/features.json
+++ b/public/features.json
@@ -1,5 +1,5 @@
{
- "generated_at": "2026-09-02T19:52:32.403Z",
+ "generated_at": "2026-09-02T19:56:14.015Z",
"generated_by": "scripts/build-page-index.mjs from data/pages.json",
"site": {
"name": "three.ws",