Skip to content
textGrain Watermark: Build and Break One in Python — ContentBuffer guide

textGrain Watermark: Build and Break One in Python

K
Kodetra Technologies··12 min read Intermediate

Summary

Build a toy keyed text watermark like OpenAI's textGrain, then measure how edits break it.

On October 5, 2026 OpenAI announced that API customers can opt in to an invisible watermark on model text, and that ChatGPT and Codex text will carry one in the EU over the coming weeks. OpenAI calls the method textGrain. It changes no characters. It nudges which words the model picks, in a way only someone holding a secret key can measure.

The detector is not public. OpenAI is giving access to approved researchers and expert organizations case by case, and the API switch is a setting rather than a request parameter. So you cannot call textGrain from Python today. What you can do is understand the mechanism well enough to reason about it: why 400 tokens detect at about 95% but 200 tokens only about 80%, why 25% word replacement nearly erases it, and why math and non-English text are harder.

Keep reading — it's free

Enter your email to keep reading — plus the best of AI & tech, daily. Free, forever.

Also get
or

Already a member? Sign in

Comments

Subscribe to join the conversation...

Be the first to comment