Public
Share AI chats as clean unlisted links
Val Town is a collaborative website to build and scale JavaScript apps.
Deploy APIs, crons, & store data – all from the browser, and deployed in milliseconds.

sharechat.val.run

Share an AI conversation as a clean, unlisted web page — like a ChatGPT/Claude share link, but for any agent (Claude Code, Codex, Cursor, …).

The homepage is the API doc. Its copied prompt contains the browser-free gzip | curl fast path. curl https://sharechat.val.run returns agent instructions as markdown; browsers get the styled version. Agents read it, POST the dialog, and hand their human back a URL.

Endpoints

  • POST /api/chats (or POST /) — {title?, source?, messages: [{role: "user"|"assistant", content} | {role: "tool", name, input?, output?}]}{url, deleteUrl, …}. Tool calls render as collapsed ⏺ Bash(…) rows, like Claude Code's /export.
  • GET /c/<id> — web page (browsers) or markdown transcript (everyone else)
  • GET /c/<id>.md / GET /c/<id>.json — explicit formats
  • DELETE /c/<id>?token=… — permanent delete

Design

  • Storage: metadata in val-scoped SQLite (chats_v1), message bodies in val-scoped blob storage (chat:<id>). Neither is public even though this code is.
  • Unlisted: 128-bit random IDs, no list endpoint, noindex on chat pages, no-referrer on outbound links. No auth — treat links as secrets, don't post credentials.
  • Rendering: server-side only, zero client JS. Markdown goes through an escape-first renderer (lib/markdown.ts) so posted content can't inject markup; images render as links so pages can't beacon viewers.
  • UI: follows the valtown-ui skill (IBM Plex Sans, black-on-white, slate + sky, 8px radius).