Root file
Serve the token as plain text at your domain root.
app.get("/stent-verification.txt", (_req, res) =>
res.type("text/plain").send("stent-verify-...")
);Reference
The publish flow contains everything needed for first success. Use this page for exact verification methods, SDK setup, and proxy API routes.
Publishing registers an existing HTTPS endpoint with a slug, a USDC price, a payout address, and an optional marketplace description. Registration creates an unverified endpoint until ownership is confirmed.
Stent forwards to an existing HTTPS endpoint you already run — it doesn't host your API. If you don't have one, a minimal Express server is enough to try the full flow: one route returning JSON, plus the verification token from either the root file or the response header (Stent checks the file first, then the header).
const express = require("express");
const app = express();
// Your paid route — return whatever data you're selling.
app.get("/data", (_req, res) => {
res.set("X-Stent-Verify", "YOUR-TOKEN-HERE"); // option 2: header
res.json({ hello: "world", ts: Date.now() });
});
// Option 1: root verification file (checked first).
app.get("/stent-verification.txt", (_req, res) =>
res.type("text/plain").send("YOUR-TOKEN-HERE")
);
app.listen(process.env.PORT || 3000);Deploy it to a free host like Railway, Render, or Fly.io to get a public HTTPS URL, then paste that URL into step 1 of the publish wizard.
Stent checks a root file first. If your hosting setup cannot serve a root file, it checks the API endpoint response header next.
Serve the token as plain text at your domain root.
app.get("/stent-verification.txt", (_req, res) =>
res.type("text/plain").send("stent-verify-...")
);Return the token on the endpoint response itself.
app.get("/data", (_req, res) => {
res.set("X-Stent-Verify", "stent-verify-...");
res.json({ ok: true });
});Buyers use a funded EVM wallet, deposit into Gateway once, then call the paid Stent URL with a spend cap. Payments currently settle on Arc testnet.
// npm install stent-sdk
import { StentClient } from "stent-sdk";
const client = new StentClient({
privateKey: process.env.BUYER_PRIVATE_KEY,
spendCapUsdc: 1.00,
});
// One-time setup after funding a buyer wallet with testnet USDC:
// await client.deposit("10");
const data = await client.fetch("https://stentproxy-production.up.railway.app/your-api");
console.log(data);These routes live on the proxy at https://stentproxy-production.up.railway.app. The dashboard uses the same routes.
POST /_api/endpointsRegister an unverified endpoint and receive a verification token.POST /_api/endpoints/:slug/verifyCheck the verification file, then the X-Stent-Verify header.GET /_api/endpointsList active, verified public endpoints for the marketplace.GET /_api/endpoints/:slugLoad price, status, publisher wallet, and sample response.PATCH /_api/endpoints/:slugPause or resume with a payout-wallet signature.Open the verification URL directly. It must return only the token, or your API response must include the exact X-Stent-Verify header.
Fund the buyer wallet with testnet USDC, then deposit into Gateway before calling the paid URL.
Choose another paid URL name. Slugs are unique across public Stent endpoints.