Setting Up as a Provider
How to set up and configure the Routstr proxy for model providers
Setting Up as a Provider
This guide outlines how to set up the Routstr proxy to offer AI models through the Routstr network.
Overview
The Routstr proxy is a reverse proxy that sits in front of any OpenAI-compatible API endpoint to handle API key payments using Cashu tokens or Lightning invoices. As a provider, you can use this to monetize access to your AI models without setting up complex payment infrastructure.
Installation
Quick Start with Docker
The fastest way to get started is using Docker:
Environment Configuration
The proxy requires configuration through environment variables:
You can provide these in a .env
file and use:
Using docker-compose
For production deployments, you can use docker-compose:
Model Configuration
Configure your models in a models.json
file:
Mount this file when running the Docker container:
Payment Integration
Cashu Integration
The proxy can integrate with any Cashu mint. Set the mint URL in your environment variables:
Lightning Integration
To accept Lightning payments, set your Lightning address:
Advanced Configuration
Custom Pricing
You can set different pricing for different models:
TLS Configuration
For production deployments, configure TLS:
Proxy & Networking
For privacy-enhanced deployments, you can route through SOCKS5 or Tor:
Admin Dashboard
The proxy includes an admin dashboard accessible at:
This dashboard provides:
- Current balance and transaction history
- Request metrics and traffic analysis
- Model usage statistics
- Configuration settings
Nostr Integration
The proxy can announce your service on the Nostr network: