Lotvs PayEarly access

For APIs, data and tools

Get paid by AI agents.

Put a price on any API route. Agents pay per request, in dollars, straight to your account.

One line of code. No accounts to create for your buyers. No invoices.

server.js
import { lotvsPay } from "@lotvs/pay";

app.get(
  "/report",
  lotvsPay({ price: "0.10" }),
  (req, res) => res.json(report)
);

How it works

One request, a price, a payment, an answer.

Agents cannot fill in a checkout form or wait for an API key by email. So the price travels with the response, and the payment travels with the next request.

  1. The agent

    Asks for something

    An ordinary request, nothing attached.

    GET /report
  2. Your API

    Answers with the price

    What it costs, and the address to pay.

    402 Payment Required PAYMENT-REQUIRED: $0.10 to you
  3. The agent

    Pays and asks again

    A signed payment for exactly that amount, good for this one request.

    GET /report PAYMENT-SIGNATURE: signed $0.10
  4. Your API

    Delivers, and gets paid

    Your code runs. The money lands at your address. The agent gets its answer and a receipt.

    200 OK PAYMENT-RESPONSE: paid, receipt attached

What you get

Built the way you would want a payment to work.

Your money never passes through us

Each payment goes from the agent's wallet straight to your address. There is no balance of yours sitting with us, and nothing to wait for or withdraw.

Nobody pays for a failed request

The payment is checked before your code runs and collected only after it succeeds. An error on your side costs the buyer nothing.

Every agent, one integration

It speaks x402, the open standard for paying over HTTP. As new ways for agents to pay appear, we add them underneath. Your code stays the same line.

Priced in dollars, paid in dollars

You write the price in dollars and receive USDC, a digital dollar, one for one. Keep it, spend it, or send it to your bank from a Lotvs account.

Live demo

Now watch it happen. This site charges a cent for a fortune.

The same four steps, against a real route built with that one line. The first two run from your browser. The last two need a wallet, so they are shown, and then you can hand the whole thing to your agent.

pay.lotvs.ai/api/demo/fortune$0.01 a request
RequestReady
GET /api/demo/fortune HTTP/1.1
Host: pay.lotvs.ai

No payment, no key, no account. This is what any agent sends the first time it meets a paid route. Send it from your browser and see what comes back.

Now with a real agent

Steps three and four happen the moment something with a wallet asks. For now this demo is on Solana's test network, so it takes test dollars, not real ones.

Tell your agentFetch https://pay.lotvs.ai/api/demo/fortune. It asks for one cent of test USDC on Solana devnet. Pay it and show me what comes back.
Or look yourselfcurl -i https://pay.lotvs.ai/api/demo/fortune

Quickstart

From install to your first paid request in minutes.

Set the address that gets paid in LOTVS_PAY_TO, wrap a route, deploy.

Express
import express from "express";
import { lotvsPay } from "@lotvs/pay";

const app = express();

app.get("/report", lotvsPay({ price: "0.10" }), (req, res) => {
  res.json({ report: "Markets were open today." });
});

app.listen(3000);
Next.js
// app/api/report/route.ts
import { withLotvsPay } from "@lotvs/pay";

export const GET = withLotvsPay({ price: "0.10" }, async () => {
  return Response.json({ report: "Markets were open today." });
});