API Licensing — Concepts (Draft, Not a Binding Agreement)

This document is a set of licensing concepts for counsel to structure into an actual Terms of Service / API License Agreement. It is not itself a contract, has not been reviewed by counsel, and creates no legal obligations for anyone. Do not present this document to a customer as terms. Nothing here should be treated as legal advice — it's a starting brief for the conversation with a lawyer, organized so the technical and commercial concepts (which do need to be decided before or alongside legal drafting) are clear.

The core distinction

A customer receives a limited license to access the API — not ownership of the API, the underlying software, the models, or the data. This is the same distinction commercial API platforms (Stripe, Twilio, Smarty) draw: you're licensing access, not buying a copy.

License types

License For Typical scope
Developer Evaluation, sandbox development, prototypes Sandbox only, developer role
Commercial Production applications customer role, production environment
Reseller Reselling services powered by the API to the reseller's own customers customer/partner role + a reseller agreement — this repository's existing multi-tenancy model (reseller_id, cost_key) is the technical mechanism this license type would run on
OEM / White-Label Embedding the platform into another company's product partner role, contractual review
Enterprise High-volume usage, negotiated SLA, dedicated support partner or trading_partner, custom scope grants
Strategic Partner Utilities, ISOs, energy retailers, aggregators, grid partners trading_partner role, privileged scopes (trading:execute, der:control, settlement:write, grid:control) issued only against environment=production per this session's implementation

Concepts to prohibit (for counsel to formalize)

SDK licensing — separate from API licensing

The SDKs in sdks/ (Python, JavaScript, PHP) are MIT-licensed and freely redistributable. The API service itself remains entirely proprietary. This is a deliberate, common pattern:

Open SDK  →  Proprietary API  →  Authentication  →  Authorization  →  Metering  →  Billing

A developer can copy the SDK freely; every call it makes still requires a valid, scoped credential against the metered API. Each SDK's LICENSE file states this explicitly — see sdks/python/LICENSE for the wording used across all three.

What this repository does NOT decide