PREGEN.ORG

How PRE-GEN works

PRE-GEN v5 · 12 October 2026 · extensions provider-identity and bind added 6 November 2026 · Copyright Valerii Egorov · Apache-2.0 · the core · source · The text is the rule; the schemas and test vectors check it, and where they disagree the text wins and the vectors get fixed.

Before an AI service generates a real person, a character or a brand, it asks the registry that represents them. The registry answers and signs the answer. Anyone can check that answer later, offline, without trusting whoever shows it. The rules are the same for every kind of subject; a profile says what applies to each, and the first profile covers a person's face and voice.

The five rules

They fit on one page: PRE-GEN-CORE.md. An AI service that does exactly this, and nothing more, implements PRE-GEN.

  1. A code names the person and their registry. TOG-<prefix>-<number><check>, for example TOG-TEST-000001N. The prefix names the registry. PG codes are retired: a PG- string is not a code. Use the ToG code your registry shows you. Codes without a prefix were issued before v5; they keep their meaning, and no registry issues new ones.
  2. The directory says whom to trust. One directory, signed by the steward key, lists each registry's prefix and keys. A registry's signature counts only for its own prefix, and the directory is loaded again at least every 24 hours.
  3. Ask. POST {api}/v2/requests with one pg.request.v1 about one subject: who, for what use, and a hash of the job. The AI service signs it with its own key and is known by its domain, so it needs no account; a registry may also issue its own credentials. The prompt and the output never leave the AI service.
  4. A signed answer. allow, deny, review or not_blocked, signed by the registry, bound to the exact request, valid for at most 900 seconds. Only allow permits.
  5. Generate only on a valid allow, and keep it. Every person in the job needs a valid allow. The kept answers are the service's proof.

Tested on 6 November 2026: a test AI app of PRAMPTA's own asked PRAMPTA, got an allow, generated, and reported the output with a signed acknowledgement in return. No outside AI provider has used it yet.

Messages

envelope       = { type, body, signatures }      body.signers = [{ role, key_id }, …]
signing input  = "PREGEN-V5" 0x00 type 0x00 canonical(body)      → Ed25519 (RFC 8032), hex
message id     = SHA-256("PREGEN-V5-ID" 0x00 type 0x00 canonical(body))   signatures not included
key id         = "pg-ed25519:" + hex(SHA-256(raw public key))[0:32]
canonical      = UTF-8, keys in code-point order, no whitespace, integers only, no normalization

Never Unicode-normalize a signed body before verifying. Verify the bytes you received.

Optional extensions

ExtensionSolves
reportsWhat happened: a report signed by the provider, an acknowledgement signed by the registry
provider-keysProvider signing keys: first key, rotation, recovery
limitsLicences with a number of uses: reserve, count, give back
jobsOne generation with several subjects; with the provider's job rules, never generating twice
grantsLicences as signed objects (pg.grant.v1)
licenseeAnswers for a connected end user
observeTrial mode: ask and record without blocking
sandboxThe same twelve test subjects in every sandbox (refusals, a test purchase, a person's terms, a minor, a creator's licence through bind), and a test directory
lookupPublic lookup of a code
identityOne person, one home registry: who proved it, not who came first
proofThe signed record travels with the output; platforms check it
catalogSubjects who chose to be offered; resale only with an explicit right
provider-identityA provider is its domain and its key: no account at any registry
bindA person connects their licences to an app
termsA person's terms of generation: public, signed, every version kept; an app accepts them by signing its request

An extension can only add. None may turn a refusal the core or a profile requires into a permission. A service uses an extension only with a registry that declares it.

The profile likeness/1

likeness/1 says what a request about a person's face and voice contains, and which refusals nothing overrides: an opt-out, a person who is not available, a minor in a prohibited category, a fixed refusal, and intimate content without the person's own signature.

One person, one home registry

A person has one home registry; other registries and AI services use and pass their code. A claim the person confirmed on their own official channel wins over unconfirmed ones. Among claims the person confirmed on their own official channel, a refusal of the person in any registry holds in all of them. With no confirmed claim PRE-GEN says nothing: the result is not_blocked (PG_IDENTITY_UNCONFIRMED), which permits nothing and refuses nothing. An impostor can neither permit nor freeze a person. A confirmation counts only at a fixed place, the official website's /.well-known/pregen or the person's own account, and a new channel permits only after seven days. Two confirmed homes for one person are a duplicate, and the stricter answer decides until one home remains; duplicates are never searched for by face or voice. A complaint is not a refusal of the person; only the person or the steward can refuse a person everywhere. A registry answers a complaint within seven days, and the steward can mark a false claim in the directory. See identity.

Creating a ToG

A person or a company makes their ToG through one process. On pregen.org/tog/create they choose one home registry from the signed list; that registry asks what they need it for and a few questions, shows a check, and issues the code. Under 18 only a parent or legal guardian files, and only a No; an AI service gets no code. The code is pending for 7 days and takes effect once confirmed: the ToG statement, whose first line is ToG: <code>, published on a website or profile the holder controls, or a company's /.well-known/tog.json. pregen.org is not a registry. See the registration process.

No middleman

An AI service and a registry talk directly, free. Services that make this easier, such as checking an agent's authority, running a sale, reporting or settlement, are optional, and anyone may offer them.

An AI service chooses which registries it connects and whom it offers; a registry chooses which services it serves. Every answer means the same thing in every registry: a registry may refuse more than the core requires, never permit more, and decides whether it gives an answer, never what the answer means. The standard is owned by no company; its author's commitment to hand it to an independent organization is in the paper, §15, and in PRE-GEN-SPEC.md §7.

The earlier interface (v1)

pg.decision.v1, POST /v1/verify/, licences pg.license.v2 and receipts stay valid and verifiable for everything issued under them, and get no new features. Their text, and the foundations the core builds on, are in PRE-GEN-SPEC.md; PRAMPTA's additions to the earlier interface (informative) are in PRE-GEN-EXTENSIONS.md.

Testing an implementation

JSON Schemas for every v5 message are in spec/schemas; byte vectors in messages.json and vectors.json. The vectors use fixed public test keys — never use them in a deployment. An open reference registry and the verification libraries are described under Build it.