Content negotiation[01]

Content negotiation

One URL, two answers. People get the page; agents that ask for Markdown get Markdown — no separate site to keep in step.

Try it on these docs

[02]

These docs negotiate too. Ask for the Quickstart three ways:

Pick one — it really asks this site.

The signals

[03]
SignalYour site (Serve SDK)These docs
A known agent's user-agentYes — 42 names, plain curl among themNo
Accept: text/markdownYes — anywhere in the headerYes
?onto on the URLYes, and it says so in X-Onto-DebugNo
.md on the URLNo — dotted paths pass throughYes

On your site

[04]

Try any request against a site running the Serve SDK:

GET /pricing
Your site
  1. Asking for Markdown — user-agent matches GPTBot (OpenAI)
  2. Note the visit — sent without waiting
  3. Fetch /.onto/pricing.md from your own site
  4. Add your context — asked, but Free gets nothing back
HTTP/1.1 200
Content-Type: text/markdown; charset=utf-8
Cache-Control: no-store, must-revalidate
Vary: User-Agent, Accept
X-Onto-Trace: GPTBot/1.2 (+https://openai.com/gptbot)
X-Onto-Bot: GPTBot (OpenAI)
X-Onto-Matched: true
# Pricing

> Plans and what each includes

**Source:** /pricing
…

What comes back

[05]
WhenYou get
Markdown, from your sitetext/markdown, Cache-Control: no-store, Vary: User-Agent, Accept, and X-Onto-* headers naming the agent
Asked, but no .md for the routeYour page as HTML, as if nothing had asked
Anyone else, on your siteYour page, plus Vary and X-Onto-Identified: false
Markdown, from these docstext/markdown, cached for an hour, with x-onto-source naming the page