OMLA Documentation
Everything you need to understand, publish, and integrate with the OMLA platform.
Overview
OMLA keeps models freely usable for personal/research work and requires a 30% share (the greater of attributable revenue or run cost) for commercial use. Models are registered with a single payout address (OMLA wallet) so funds cascade automatically through the lineage.
Two lanes
Personal/Research: free. Commercial: 30% of attributable revenue or run cost — whichever is greater.
One model → one wallet
Every model has a unique omla1… address. Derivatives declare contributions; splits cascade automatically.
Cryptographic identity
Ed25519 keypairs anchor model ownership. SHA-256 hashes anchor specific weight files.
Compliance state machine
REGISTERED → REPORTING → COMPLIANT → DELINQUENT → BLACKLISTED. Transitions are automatic.
Getting started
- Read the License (v8-10-2025).
- Compute the SHA-256 hash of your model weights:
sha256sum your-model.bin - Generate an Ed25519 keypair (use the registration form or
tweetnacl). - Register your model to obtain an OMLA wallet address and declare lineage.
- Add
OMLA-ID: omla1…to your model card/README and email verify@omla-ai.org. - For commercial use: send 30% of the applicable basis to the model's wallet quarterly.
API Overview
The OMLA API is powered by Supabase PostgREST — all CRUD operations are auto-generated from the PostgreSQL schema. The base URL is https://YOUR_PROJECT.supabase.co/rest/v1/ (set in assets/js/config.js). Authentication uses Supabase JWT tokens.
Public Endpoints (No Auth)
| Method | Endpoint | Description |
|---|---|---|
GET | /models?is_active=eq.true&order=created_at.desc | List all active models |
GET | /models?id=eq.{uuid}&select=*,model_metadata(*),wallets(*) | Model detail with joins |
GET | /models?name=ilike.*{query}* | Search models by name |
GET | /models?model_hash=eq.{sha256} | Lookup by weight hash |
POST | /rpc/resolve_splits body: {"target_model_id":"uuid"} | Get resolved split table |
Authenticated Endpoints (Creator)
| Method | Endpoint | Description |
|---|---|---|
POST | /models | Register new model |
PATCH | /wallets?id=eq.{uuid} | Update wallet payment rail |
GET | /payments?wallet_id=in.({ids}) | View earnings |
Authenticated Endpoints (Commercial User)
| Method | Endpoint | Description |
|---|---|---|
POST | /usage_reports | Submit quarterly report |
GET | /usage_reports?reporter_id=eq.{uuid} | View past reports |
GET | /payments?report_id=eq.{uuid} | View payment status |
Database Schema
10 tables in Supabase PostgreSQL (Tokyo region). All tables have Row Level Security (RLS) enabled.
| Table | Purpose | Key columns |
|---|---|---|
models | Immutable model registry | id, name, ed25519_pubkey, model_hash, description, license_version, is_active |
model_metadata | Mutable key/value overlay | model_id, key, value (JSONB) |
lineage_edges | DAG derivation relationships | parent_id, child_id, relationship, contribution_weight |
wallets | Payment destinations | model_id, address (omla1…), rail, rail_identifier, is_primary |
contribution_splits | Percentage splits per wallet | model_id, recipient_wallet_id, percentage, effective_until |
commercial_users | Companies using OMLA models | company_name, contact_email, api_key_hash |
usage_reports | Quarterly revenue/cost reports | model_id, reporter_id, revenue_usd, run_cost_usd, royalty_basis, quarter, status |
payments | Payment records | model_id, wallet_id, amount_usd, rail, status, paid_at |
compliance_state | State machine per model | model_id, state (enum), last_report_at, blacklisted_at |
audit_log | Append-only event log | entity, entity_id, action, actor, before_state, after_state |
Relationship types (lineage_edges.relationship)
Allowed values: fine-tune, merge, distill, quantize, derivative.
Payment rail types (wallets.rail)
Allowed values: stripe, paypal, lightning, ach, sepa, wise, other.
Wallet Protocol
The OMLA wallet protocol defines how payments are received, split, and routed through the lineage DAG.
Address Resolution Flow
Client sends: omla1qq0emf5v...
↓
Registry lookup: /rest/v1/wallets?address=eq.omla1qq0emf5v...
↓
Returns: { model_id, rail: "stripe", rail_identifier: "acct_xxx" }
↓
Split resolution: SELECT * FROM resolve_splits(model_id)
↓
Returns: [
{ wallet: "omla1...", rail: "stripe", percentage: 40.00 },
{ wallet: "omla1...", rail: "paypal", percentage: 35.00 },
{ wallet: "omla1...", rail: "lightning", percentage: 25.00 }
]
↓
Payment engine: route $amount × percentage to each wallet via its rail
Quarterly Payout Batch
Runs on the first business day of each quarter:
- Query all
usage_reportswherequarter = current_quarterandstatus = 'submitted' - For each report, verify
royalty_amount = max(revenue × 0.30, run_cost × 0.30) - Call
resolve_splits(model_id)for each model in report - Aggregate: net all payments to each unique wallet across all reports
- Filter: drop wallets where total < $0.10 (carry forward)
- Execute payments, select least-cost rail per wallet
- Update
usage_reports.status = 'paid'andcompliance_state = 'COMPLIANT'
Ed25519 Identity
Each model creator generates an Ed25519 keypair for cryptographic identity. The keypair anchors model ownership and authorizes future updates.
Keypair Components
| Component | Size | Storage | Purpose |
|---|---|---|---|
| Public key | 32 bytes (base64) | OMLA registry (public) | Identifies the creator; verifies signatures |
| Secret key | 64 bytes (base64) | Creator's device only | Signs registrations and updates |
JavaScript (tweetnacl)
import nacl from 'tweetnacl';
import { encodeBase64 } from 'tweetnacl-util';
const kp = nacl.sign.keyPair();
const publicKey = encodeBase64(kp.publicKey); // Store in registry
const secretKey = encodeBase64(kp.secretKey); // Creator keeps this
Signing a Registration Payload
const message = JSON.stringify({ name, model_hash, pubkey, timestamp });
const messageBytes = new TextEncoder().encode(message);
const signature = nacl.sign.detached(messageBytes, decodeBase64(secretKey));
const signatureBase64 = encodeBase64(signature);
Bech32m Address Format
OMLA wallet addresses use Bech32m encoding (BIP-350), the same format as Bitcoin SegWit v1 addresses.
| Property | Value |
|---|---|
| Encoding | Bech32m (BIP-350) |
| Human-readable prefix | omla |
| Payload | 32 bytes (model UUID as bytes) |
| Full length | 43–63 characters |
| Validation regex | ^omla1[a-z0-9]{38,58}$ |
| Example | omla1qq0emf5v8xgs5gwtk4gec7fy5k7spvgc8q3m2 |
JavaScript (bech32 library)
import { bech32m } from 'bech32';
// Generate from model UUID bytes
const words = bech32m.toWords(modelUuidBytes);
const address = bech32m.encode('omla', words, 90);
// Decode
const { prefix, words: w } = bech32m.decode(address, 90);
const uuidBytes = bech32m.fromWords(w);
Split Resolution Algorithm
The split resolution algorithm traverses the lineage DAG recursively and produces a flat terminal split table — one row per creator wallet with their final percentage of any payment.
PostgreSQL Function
SELECT * FROM resolve_splits('your-model-uuid-here'::uuid);
-- Returns: { wallet_address, wallet_rail, percentage }
Pseudocode
function resolve_splits(model_id, weight = 1.0):
terminal_splits = {}
for each upstream in model.lineage_edges:
if upstream.parent is OMLA-registered:
child_splits = resolve_splits(
upstream.parent_id,
weight × upstream.contribution_weight
)
merge_additive(terminal_splits, child_splits)
for each split in model.contribution_splits:
terminal_splits[split.wallet] += weight × (split.percentage / 100)
return terminal_splits
Complexity: O(V + E) where V = models in lineage, E = edges. Practical depth: 2–5 levels.
Implementation: Recursive CTE in PostgreSQL (WITH RECURSIVE). Called via Supabase RPC endpoint.
Compliance States
Every model and commercial user entity in the registry has a compliance state. Transitions are automatic based on report submissions, payment verifications, and missed deadlines.
| State | Meaning | Transition triggers |
|---|---|---|
| REGISTERED | Model registered; no commercial use reported | → REPORTING on first report submission |
| REPORTING | Commercial use declared; reports submitted | → COMPLIANT on verified payment; → DELINQUENT on missed deadline |
| COMPLIANT | Reports verified and payments confirmed | → REPORTING when next quarter report submitted |
| DELINQUENT | Missed quarterly payment deadline (30+ days past quarter end) | → BLACKLISTED after 90 days with no resolution |
| BLACKLISTED | Published on quarterly blacklist; access may be restricted | → UNDER_REVIEW if entity disputes and provides evidence |
Blacklists are published quarterly at /api/blacklist.json (signed JSON).
Publish a model
The Publish page guides you through a 6-step registration: model identity, Ed25519 keypair, lineage declaration, wallet setup, contribution splits, and signing.
Example model JSON (generated by the form)
{
"name": "ExampleLM-7B",
"domain": "NLP",
"description": "A 7B parameter language model.",
"model_hash": "e3b0c44298fc1c149afbf4c8996fb924...",
"ed25519_pubkey": "base64-encoded-32-bytes",
"license_version": "v8-10-2025",
"wallet": {
"address": "omla1qq0emf5v8xgs5gwtk4gec7fy5k7spvg...",
"rail": "stripe",
"rail_identifier": "acct_xxx"
},
"lineage": [
{ "parent_wallet": "omla1...", "relationship": "fine-tune", "contribution_weight": 0.40 }
],
"contribution_splits": [
{ "recipient": "Alice", "wallet": "omla1...", "percentage": 70 },
{ "recipient": "Bob", "wallet": "omla1...", "percentage": 30 }
],
"registration_signature": "base64-encoded-64-bytes"
}
Royalties & payments
Commercial users pay the greater of 30% of attributable revenue or 30% of total model run cost. Payments are due quarterly. Minimum per-wallet payout: $0.10 USD.
- Attributable revenue: Revenue directly tied to using the model (subscriptions, API fees, output sales)
- Run cost: Compute, storage, bandwidth, hardware depreciation, direct IT support
- Pipelines: For multi-model systems, split royalties by declared contribution percentages
- Fees: Routing/conversion fees deductible up to 10% of the royalty
Derivatives & attribution
Declare upstream models and contribution weights when registering. A weight of 0.40 means 40% of payments received by your model cascade upstream to that parent.
What counts as a derivative?
Fine-tunes, LoRAs, merges, distillations, quantizations, or any adaptation based on a base model. Declare the relationship type and contribution weight for each upstream model.
Can I use a non-OMLA model as a base?
Yes. Only OMLA-registered upstream models receive cascading payments. Non-OMLA base models (e.g., MIT-licensed) are listed for transparency but do not receive royalty flows through the OMLA system.
Security & verification
- Ownership verification: Ed25519 signature on registration; add
OMLA-ID: omla1…to model card and email verify@omla-ai.org - Weight integrity: SHA-256 hash of model weights anchors the specific file version
- RLS policies: Unauthenticated users can only read models/registry; writes require auth
- Audit log: Append-only log of all mutations with before/after state
- API keys: Commercial user keys hashed with bcrypt; never stored plaintext
- No PII: Only email and wallet addresses stored beyond model metadata
Integration
The Svelte SPA (coming soon) provides the full authenticated interface. For now:
- Query the public registry via Supabase PostgREST (anon key required)
- Call
resolve_splits(model_id)to get terminal payment splits - Attach your model JSON to repos and model cards for tooling to consume
- For manual registration: email verify@omla-ai.org with your registration JSON
Glossary
| Term | Meaning |
|---|---|
| OMLA wallet | A omla1… Bech32m address that routes payments to a creator's payment rail |
| Derivative | A model built from another (fine-tune, LoRA, merge, distillation, quantization) |
| Contribution weight | Fraction (0–1) of payments that cascade upstream to a parent model |
| Contribution split | Percentage of a model's royalty pool allocated to a specific recipient wallet |
| Lineage DAG | Directed acyclic graph of parent→child derivation relationships |
| Terminal split | The flattened final allocation of a payment across all creator wallets |
| Ed25519 | Elliptic-curve digital signature scheme used for creator identity |
| Bech32m | Encoding scheme (BIP-350) used for OMLA wallet addresses |
| Royalty basis | The figure used to compute the 30% royalty: greater of revenue or run cost |
| Payment rail | Payment method: Stripe, PayPal, Lightning, ACH, SEPA, Wise, or other |
| RLS | Row Level Security — PostgreSQL policy system controlling data access |
| PostgREST | Auto-generated REST API from PostgreSQL schema, used by Supabase |