Reference

Use Stent when you already know the task.

The publish flow contains everything needed for first success. Use this page for exact verification methods, SDK setup, and proxy API routes.

Publish API

Publish an API

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.

  1. Enter the endpoint URL, public paid URL name, and per-request price.
  2. Add the payout wallet that should receive publisher earnings.
  3. Verify ownership with a file or response header.
  4. Run the paywall check and paid request from the success screen.

No API yet?

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).

server.js
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.

Verify ownership

Stent checks a root file first. If your hosting setup cannot serve a root file, it checks the API endpoint response header next.

Root file

Serve the token as plain text at your domain root.

server.ts
app.get("/stent-verification.txt", (_req, res) =>
  res.type("text/plain").send("stent-verify-...")
);

Response header

Return the token on the endpoint response itself.

server.ts
app.get("/data", (_req, res) => {
  res.set("X-Stent-Verify", "stent-verify-...");
  res.json({ ok: true });
});

Proxy API reference

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.

Common fixes

Verification keeps failing

Open the verification URL directly. It must return only the token, or your API response must include the exact X-Stent-Verify header.

The paid request cannot fund

Fund the buyer wallet with testnet USDC, then deposit into Gateway before calling the paid URL.

The slug is taken

Choose another paid URL name. Slugs are unique across public Stent endpoints.