Use Cases

What you can build with Solgateskit

Every HTTP endpoint becomes a revenue stream. No subscriptions, no API key management, no billing infrastructure. Just pay-per-request on Solana.

AI API Monetization

Charge per inference call. Let users pay only for what they consume — no subscriptions, no API keys to manage. Every request is a microtransaction on Solana.

import { createGate } from "@solgateskit/server";

const gate = createGate({
  price: 0.001, // SOL per request
  endpoint: "/api/inference",
});

// User pays 0.001 SOL per call
const result = await gate.handle(req);

Premium Data Feeds

Monetize market data, analytics, or proprietary datasets. Consumers pay per query — no monthly commitments, instant access on payment confirmation.

import { createGate } from "@solgateskit/server";

const gate = createGate({
  price: 0.0005,
  endpoint: "/api/market-data",
  metadata: { feed: "real-time-ohlcv" },
});

// Each data request costs 0.0005 SOL
app.use("/api/market-data", gate.middleware());

Rate-Limited Public APIs

Offer a free tier with rate limits, then let power users pay to bypass them. No signup required — just attach a payment to the request.

import { createGate } from "@solgateskit/server";

const gate = createGate({
  price: 0.0002,
  endpoint: "/api/search",
  bypassRateLimit: true,
});

// Free: 10 req/min | Paid: unlimited
app.use("/api/search", gate.rateLimited({
  free: 10,
  paid: Infinity,
}));

Micropayment Content

Pay-per-article, pay-per-query, pay-per-download. Unlock content instantly with a Solana transaction — no paywalls, no accounts, no friction.

import { SolgatesClient } from "@solgateskit/client";

const client = new SolgatesClient({
  wallet: userWallet,
});

// Pay and read — one line
const article = await client.fetch(
  "https://api.example.com/articles/42",
  { price: 0.001 }
);

How it works

01

Client sends request

The SDK attaches a signed Solana transaction to the HTTP request headers.

02

Server verifies payment

Middleware validates the transaction on-chain before processing the request.

03

Response delivered

On confirmation, the API responds normally. Failed payments return HTTP 402.