Docs

Use Cases

Opsalis bills for any service — not just REST APIs. If it runs in a Docker container and accepts connections, you can monetize it. Here are concrete examples with step-by-step setup guides.

AI Gateway — Sell Access to LLMs

Run a local LLM (or proxy a remote one) and charge per call or per month.

What you need

Setup (5 minutes)

# 1. Start Ollama with a model
docker run -d --gpus all -p 11434:11434 ollama/ollama
docker exec -it ollama ollama pull llama3.1

# 2. Start Opsalis wrapper
docker run -d -p 3000:3000 -p 3002:3002 opsalis/wrapper

# 3. Open the web console at https://localhost:3002
#    Go to My APIs → Register
#    Name: "Llama 3.1 Chat"
#    Upstream URL: http://host.docker.internal:11434
#    Price: $0.001 per call
#    Click Register

Done. Your LLM is now in the Opsalis catalog. Anyone can find it, call it, and pay you in USDC — automatically.

Subscription model

For unlimited monthly access (ideal for corporate customers):

Streaming

AI responses stream token-by-token via SSE or WebSocket:

# SSE streaming
curl -N http://your-node:3006/stream/llama-chat \
  -H "X-Consumer-Key: your-key" \
  -H "Accept: text/event-stream" \
  -d '{"prompt": "Explain quantum computing", "stream": true}'

# WebSocket (persistent connection)
wscat -c "ws://your-node:3006/ws/llama-chat?token=your-key"
> {"prompt": "Explain quantum computing"}

Video Streaming — Monetize Live or Recorded Video

Run an open-source video server alongside your wrapper. Opsalis handles billing, the video server handles streaming.

Option A: Video Conferencing (Jitsi Meet)

# docker-compose.yml
services:
  wrapper:
    image: opsalis/wrapper
    ports: [3000:3000, 3002:3002, 3005:3005, 3006:3006]

  jitsi:
    image: jitsi/web
    ports: [8443:443]
    environment:
      - ENABLE_AUTH=1

Register Jitsi as an API in your wrapper (upstream: http://jitsi:443). Consumers pay per session to join video calls.

Option B: Live Video Streaming (MediaMTX)

# docker-compose.yml
services:
  wrapper:
    image: opsalis/wrapper
    ports: [3000:3000, 3002:3002]

  mediamtx:
    image: bluenviron/mediamtx
    ports: [8554:8554, 8888:8888]

MediaMTX accepts RTSP/RTMP/HLS streams. Register it as an API. Consumers pay per view or per minute to access live streams.

Option C: Video Transcoding (FFmpeg as a Service)

Build a simple API server that accepts video uploads, transcodes with FFmpeg, and returns the result. Register it in your wrapper. Consumers pay per transcode job.

IoT Data Feeds — Sell Sensor Data

Connect IoT sensors to a simple API server. Sell real-time data feeds.

Examples

Setup

# Simple Python API that reads from a sensor
from flask import Flask, jsonify
import sensor_lib  # your sensor library

app = Flask(__name__)

@app.route('/v1/reading')
def reading():
    return jsonify({
        'temperature': sensor_lib.read_temp(),
        'humidity': sensor_lib.read_humidity(),
        'timestamp': time.time()
    })

# Run on port 5001
app.run(host='0.0.0.0', port=5001)

Register in your wrapper: upstream http://localhost:5001, price $0.0001 per reading. A Raspberry Pi with a $5 sensor becomes a revenue-generating data feed.

Database Access — Monetize Your Data

Wrap any database (PostgreSQL, MongoDB, Elasticsearch) behind a read-only API. Sell query access.

Setup

# PostgREST turns any PostgreSQL database into a REST API
docker run -d -p 5001:3000 \
  -e PGRST_DB_URI="postgres://user:pass@db:5432/mydata" \
  -e PGRST_DB_ANON_ROLE="web_anon" \
  postgrest/postgrest

Register PostgREST as an API in your wrapper. Consumers query your database and pay per request. You control which tables are exposed via PostgreSQL roles.

Other databases

File Storage — Sell Cloud Storage

Run MinIO (S3-compatible storage) and sell file upload/download access.

# docker-compose.yml
services:
  wrapper:
    image: opsalis/wrapper
    ports: [3000:3000, 3002:3002]

  minio:
    image: minio/minio
    command: server /data
    ports: [9000:9000]
    volumes: [minio-data:/data]

volumes:
  minio-data:

Register MinIO S3 API as an API in your wrapper. Consumers pay per upload/download. You earn from unused disk space on your machine.

Compute — Sell Processing Power

Turn spare compute into revenue.

Examples

Setup pattern (same for all)

# 1. Run the processing tool in Docker
docker run -d -p 5001:8080 your-processing-service

# 2. Register in your wrapper
#    Upstream: http://localhost:5001
#    Price: based on compute cost + your margin

# 3. Consumers call it, you get paid automatically

Web Scraping — Sell Structured Data

Scrape public websites, structure the data, and sell it as a clean API.

Examples

Build a scraper with Playwright or Cheerio, wrap it in an Express API, register in your wrapper. Consumers pay per query instead of building their own scrapers.

Notification Service — Sell Alerts

Build a notification gateway that sends SMS, email, push, or WhatsApp messages.

# Simple notification API
app.post('/v1/send', (req, res) => {
  const { channel, to, message } = req.body;
  if (channel === 'sms') sendSMS(to, message);
  if (channel === 'email') sendEmail(to, message);
  if (channel === 'whatsapp') sendWhatsApp(to, message);
  res.json({ ok: true, delivered: true });
});

Register in your wrapper. Consumers pay per notification. You aggregate multiple providers (Twilio, SendGrid, etc.) and offer one unified API.

Identity Verification — Sell KYC/Auth

Run identity verification services and charge per check.

Examples

Blockchain Data — Sell On-Chain Analytics

Index blockchain data and sell queries. Many developers need historical on-chain data but don’t want to run their own archive node.

Examples

Run your indexer, expose it as an API, register in your wrapper. Consumers pay per query.

Gaming Services — Sell Game Infrastructure

Tribe Gateway — Shared AI for Teams

Your team, company, or community buys one AI API key. Deploy one Opsalis wrapper with subscription ports. Members connect via SSO and get unlimited AI access for a flat monthly fee. Finance sees per-member cost breakdown automatically.

How it works

  1. Install wrapper + connect to your AI provider (OpenAI, Claude, Mistral, local Ollama)
  2. Open web console → Subscriptions → Add a Tribe
  3. Enter your team’s SSO details (OAuth URL, client ID, secret)
  4. Set the monthly fee per member
  5. Members connect to port 3005 (MCP) or 3006 (REST) with their email
  6. First call each month: USDC settlement (~2 seconds). Rest of the month: unlimited, instant.

Pricing examples

Tribe sizeMonthly fee/memberYour revenueOpsalis royalty (5%)
Startup (10 members)$20$190/mo$10/mo
Mid-size (100 members)$30$2,850/mo$150/mo
Enterprise (1,000 members)$50$47,500/mo$2,500/mo

Set any price you want. You keep 95%, Opsalis takes 5% — automatically, on-chain, no invoices.

Use cases for Tribe Gateway

The Universal Pattern

Every use case follows the same three steps:

  1. Run your service in Docker (any port, any protocol)
  2. Register it in your Opsalis wrapper (upstream URL + price)
  3. Consumers find and pay automatically via the catalog

If it accepts HTTP requests, you can monetize it with Opsalis. No payment integration, no billing code, no invoices. The blockchain handles everything.