A PDF file that asks a language model for a story, over the internet, while you are reading it.
Download the PDFOpen it in Adobe Acrobat or Acrobat Reader. It will not work in Chrome, Firefox, Edge, or Preview — their PDF viewers implement no networking at all.
PDF files can contain JavaScript. Acrobat gives that JavaScript exactly one way
to reach the network: Doc.submitForm(), which posts the form's fields
to a URL. The trick is the reply — if the server answers with an
application/vnd.fdf document, Acrobat parses it and writes the values
straight back into the form's fields. That is the return channel.
Two reasons, both unavoidable.
The API key. Anyone who opens a PDF can read every byte of it, so a key stored inside the document is a published key. The relay holds it instead.
Acrobat will not wait. Writing a story takes seconds, and
Acrobat drops a submitForm connection long before a slow one
finishes — the reply is simply lost. So the relay never makes the PDF wait:
it hands back a job number in milliseconds and lets the document poll.
Acrobat will ask once whether to allow the document to contact the relay. That is its cross-domain check — a PDF opened from your disk has no origin of its own, so every response counts as cross-domain. Choose Allow.
The window freezes for a moment on each poll, because submitForm
blocks the interface. The status line counts the seconds so you can tell it is
still working.