PRE-GEN

Connect your AI

Your AI asks before it shows a real person, a character or a brand, and goes ahead only on a signed yes. No account anywhere. For a developer, about a day.

The easy way: give this to your AI assistant

Copy the prompt and paste it into your AI assistant, for example Claude Code, Cursor or ChatGPT. It reads the guides, finds where your product generates people, plans the change with you, and explains every step. If something is unclear, it stops and explains.

You are helping me add PRE-GEN to my AI product.

PRE-GEN is an open protocol: before my product generates a real person, a character or a brand, it asks the registry that speaks for them, and generates only on a signed "allow".

First, read these fully:
- https://www.pregen.org/llms.txt
- https://www.pregen.org/docs/provider.md (the complete guide)
- https://www.pregen.org/spec/PRE-GEN-CORE.md (the rules; where the guide and the rules differ, the rules win)
- https://www.pregen.org/spec/extensions/provider-identity.md (the rule for an app known by its domain, with no credential; the guide follows it)

Then work with me, step by step:
1. Look through my code and find every place where we generate images, video or voice. Tell me which of them can show a real person, a character or a brand.
2. Before you change any code, explain your plan in plain words: where the check goes, which library you will use (pregen for Python, @pregen/verify for JavaScript), and where the private key will be kept.
3. Follow docs/provider.md, fitting its complete example into our own code: make our key (keep it as a secret, never in code or logs), build the party document for our domain, ask before every generation, check the answer, generate only on a valid allow, report the output, keep the proof with it.
4. Test on the public test network first, until each of the eight test codes gives exactly the answer the guide's table lists.
5. Ask me before you accept any terms, store any secret, or deploy anything.

As you go, explain each step to me in plain words, as if I am not a programmer. If anything is unclear, or does not fit our code, stop, tell me what is unclear and what my options are, and wait for my answer. Never send our prompts or outputs to a registry, and never present an output as permitted without a valid allow.

What your assistant will do, in four steps:

  1. 1

    Install the library

    One package, for Python or JavaScript.

    pip install "pregen>=0.12.0"
    npm install @pregen/verify@^0.12.0
  2. 2

    Put one file on your website

    Your website's address is your name in PRE-GEN. Make a key, and the library builds a small file that says who you are. Publish it on your site.

  3. 3

    Ask before you generate

    Each person has a code. Send it to their registry, check the signed answer, and generate only if it says allow. A registry may answer “not accepted” until it has checked your app: that is not an error.

  4. 4

    Test it first

    The public test network has eight test people, each answering differently. When your app handles all eight, switch it on for real.

Already have PRE-GEN? Nothing to add here: go straight to the registry you want to buy licences from. Buying and selling are each registry's own, optional layer. Two layers

For your developer

Everything above, in full detail, with examples that run.