Get OpenRSL running.
A practical guide to adding RSL licensing to your site or crawler. From install to first paid request in under an hour. The reference implementation is in Python, PHP, and TypeScript. The OLP server can be self-hosted or managed via PDS.
What you need.
A site with URLs
OpenRSL works with any site that has stable, addressable URLs. Your content structure does not change.
A payment account
The reference implementation settles via PDS (Personal Digital Spaces). You need a PDS account to receive payouts. Other payment providers can be wired via the pluggable adapter.
One of the three libraries
Python, TypeScript, or PHP. Pick the one that matches your stack.
Three steps to your first license.
Install the library
# Python $ pip install openrsl # TypeScript $ npm install @openrsl/sdk # PHP $ composer require openrsl/openrsl
Generate your manifest
import openrsl xml = openrsl.generate_rsl_xml([ openrsl.ContentRule( url="/article/the-old-deal", olp_server="https://olp.example.com", license=openrsl.LicenseRule( permits=[openrsl.PermitRule( text="ai-train", type="usage" )], payment=openrsl.PaymentRule( type="crawl", amount="0.004", currency="USD", ), ), ) ]) # annotate robots.txt robots = openrsl.annotate_robots_txt( existing, "https://olp.example.com" )
Connect payouts
Configure your payment provider in the library settings. The reference implementation connects to PDS (Personal Digital Spaces). Once connected, every license ticket acquisition triggers a payment and issues a receipt.
The four-move flow.
Any crawler can become an RSL-compliant buyer. The flow is: discover the manifest, read the terms, acquire a ticket via OLP, and present the ticket via CAP. The library handles all four steps.
import openrsl, requests # 1. Read robots.txt and discover OLP endpoint olp_url = "https://olp.example.com" rsl_xml = requests.get("https://example.com/rsl.xml").text # 2. Acquire a ticket (OLP) token = openrsl.request_token( olp_url=olp_url, resource="https://example.com/article/the-old-deal", license_xml=rsl_xml, wallet_id="wallet-id", secret="wallet-secret", ) # 3. Fetch with proof (CAP) headers = openrsl.cap_header(token) # {"Authorization": "License <token>"} response = requests.get( "https://example.com/article/the-old-deal", headers=headers, )
Run your own token endpoint.
The OLP server is a standalone service in the repository under olp-server/. It handles token issuance, asset gating, intent declaration, and payment processing. You can run it inside your own infrastructure or use the managed version via PDS.
$ git clone https://github.com/openrsl/openrsl $ cd openRSL/olp-server $ npm ci --ignore-scripts $ npx tsc $ PAYMENT_PROVIDER=mock node dist/index.js # OLP server running on :3000 # Token endpoint: /token # Verify endpoint: /introspect # JWKS: /key
Where to go from here.
Overview
Architecture, use cases, glossary, and scope boundaries. Start here if you want the full picture before diving into code.
Quickstart
Step-by-step guides for PHP, Python, and TypeScript publishers, the OLP server, and the crawler demo. Pick your language and go.
API Reference
Full API docs for the OLP server and the Python, TypeScript, and PHP libraries. Every method, parameter, and return type.
Spec
The full RSL, OLP, and CAP protocol definitions. Read this if you are implementing from scratch or need the authoritative reference.
FAQ
Common questions about pricing, compliance, self-hosting, and how RSL relates to robots.txt and existing content agreements.
GitHub
Source for all libraries, the OLP server, and end-to-end examples. Issues and pull requests welcome.