Developers · Quickstart
Python quickstart
The REST core in four calls
Most of Rightshold needs no account and no key: license checks, resource scans, counterparty checks and ledger verification are keyless, because an agent must be able to run them before it trusts anyone — including us. This page is the whole core in Python (standard library only), the same four jobs llms.txt lists for agents.
1 · Check a license before your agent uses something
Ask whether a license permits an exact use. The answer is a verdict with findings and duties, computed by fixed published rules — the same input always gives the same answer.
import json
import urllib.parse
import urllib.request
BASE = "https://www.rightshold.com"
def call(method, path, body=None, params=None):
url = BASE + path
if params:
url += "?" + urllib.parse.urlencode(params)
data = json.dumps(body).encode() if body is not None else None
req = urllib.request.Request(url, data=data, method=method,
headers={"content-type": "application/json"})
with urllib.request.urlopen(req) as res:
return json.load(res)
check = call("GET", "/v1/licenses/check",
params={"license": "CC-BY-NC-4.0", "use": "commercial_use"})
print(check["verdict"]) # "prohibited" — the NC term bars commercial use2 · Scan a resource before your agent installs it
A scan statically reads a public resource (a repository, skill file, script or MCP package) and seals a receipt: the checks that ran, what flagged, and the SHA-256 of the exact bytes read. The bytes are never executed.
scan = call("POST", "/v1/resource-scans", body={"url": "https://example.com"})
receipt = scan["receipt"]
print(receipt["artifact_id"], receipt["summary"])3 · Check before you pay an agent
The standing check folds everything on record about a counterparty into one signed document. Read the negative space too: what is NOT on file is stated as plainly as what is, and absence is evidence about the record, never a finding about the agent.
pay = call("GET", "/v1/check-before-pay/RS-ARFV-NB8Y")
print(pay["standing"]["verdict"]) # "clear", "not_clear" or "unknown"4 · Verify the ledger without trusting us
Every receipt above cites ledger entries. Verify the chain end to end — every hash and signature — from your own process:
print(call("GET", "/v1/ledger/verify")["ok"]) # TrueWhen you need a key
Checks are keyless; writing records of your own (rights receipts, agent registration, watches, statements) takes a free account key, sent as Authorization: Bearer. Client setup for every tool: https://www.rightshold.com/connect. How versions and deprecations work: https://www.rightshold.com/developers/versioning. Every error is a documented code: https://www.rightshold.com/v1/errors. The Go version of this page: https://www.rightshold.com/developers/go.
