{
  "openapi": "3.1.0",
  "info": {
    "title": "Max Song content API",
    "version": "2026-09-03",
    "summary": "Read-only HTTP interface of https://maxsong.me: pages as HTML or Markdown, discovery files and a health probe.",
    "description": "Everything on https://maxsong.me that a script or an AI agent can read without running JavaScript.\n\nAll endpoints are GET, public and unauthenticated; there is nothing to write.\n\nEvery page is also served as Markdown via content negotiation (`Accept: text/markdown`). Clients that are not browsers may get a Cloudflare challenge (HTTP 403) on pages; discovery files are served to every client.\n\nNo page or discovery file needs authentication. Discovery files (robots.txt, sitemap.xml, rss.xml, llms.txt, this document and the API catalog) are served to every client. Security controls may still reject malicious or abusive requests.\n\nThe music library, audio and analysis files behind the Sound page are private to the site's own player and are not part of this API; agents holding a token from the site's OAuth 2.1 authorization server (see /auth.md) may read them.",
    "contact": {
      "name": "Max Song",
      "email": "hello@maxsong.me",
      "url": "https://maxsong.me/contact/"
    }
  },
  "externalDocs": {
    "description": "Human-readable documentation",
    "url": "https://maxsong.me/api-docs/"
  },
  "servers": [
    {
      "url": "https://maxsong.me"
    }
  ],
  "tags": [
    {
      "name": "pages",
      "description": "Site pages. HTML by default, Markdown on request."
    },
    {
      "name": "discovery",
      "description": "Machine-readable files that describe the site."
    },
    {
      "name": "status",
      "description": "Liveness."
    }
  ],
  "paths": {
    "/": {
      "get": {
        "operationId": "getHome",
        "summary": "Max Song — Code & Sound",
        "description": "Websites, tools and research by Max Song, his own music in a player he built, and a timeline of everything since ninth grade.",
        "tags": [
          "pages"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/Accept"
          }
        ],
        "responses": {
          "200": {
            "description": "The page as HTML, or as Markdown when the Accept header prefers text/markdown.",
            "content": {
              "text/html": {
                "schema": {
                  "type": "string"
                }
              },
              "text/markdown": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/about/": {
      "get": {
        "operationId": "getAbout",
        "summary": "About Me",
        "description": "Max Song, a high-school student who builds websites, AI tools and audio software and writes his own music: what he studies, what he builds, and how he works.",
        "tags": [
          "pages"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/Accept"
          }
        ],
        "responses": {
          "200": {
            "description": "The page as HTML, or as Markdown when the Accept header prefers text/markdown.",
            "content": {
              "text/html": {
                "schema": {
                  "type": "string"
                }
              },
              "text/markdown": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/work/": {
      "get": {
        "operationId": "getWork",
        "summary": "Works",
        "description": "Websites, demos, desktop tools and audio software by Max Song, with a note on each and links to the ones you can try.",
        "tags": [
          "pages"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/Accept"
          }
        ],
        "responses": {
          "200": {
            "description": "The page as HTML, or as Markdown when the Accept header prefers text/markdown.",
            "content": {
              "text/html": {
                "schema": {
                  "type": "string"
                }
              },
              "text/markdown": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/papers/": {
      "get": {
        "operationId": "getPapers",
        "summary": "Papers",
        "description": "Papers by Max Song: what to learn when answers are cheap, when an AI agent’s work is done, and how top websites answer the door to AI crawlers.",
        "tags": [
          "pages"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/Accept"
          }
        ],
        "responses": {
          "200": {
            "description": "The page as HTML, or as Markdown when the Accept header prefers text/markdown.",
            "content": {
              "text/html": {
                "schema": {
                  "type": "string"
                }
              },
              "text/markdown": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/skills/": {
      "get": {
        "operationId": "getSkills",
        "summary": "Skills",
        "description": "Instructions for AI agents, the workflow around them, and the tools behind the work.",
        "tags": [
          "pages"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/Accept"
          }
        ],
        "responses": {
          "200": {
            "description": "The page as HTML, or as Markdown when the Accept header prefers text/markdown.",
            "content": {
              "text/html": {
                "schema": {
                  "type": "string"
                }
              },
              "text/markdown": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/sound/": {
      "get": {
        "operationId": "getSound",
        "summary": "Sound",
        "description": "Max Song’s own music: ambient and dub techno, tracks and demos from FL Studio, in a browser player with DJ controls.",
        "tags": [
          "pages"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/Accept"
          }
        ],
        "responses": {
          "200": {
            "description": "The page as HTML, or as Markdown when the Accept header prefers text/markdown.",
            "content": {
              "text/html": {
                "schema": {
                  "type": "string"
                }
              },
              "text/markdown": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/journal/": {
      "get": {
        "operationId": "getJournal",
        "summary": "Journal",
        "description": "Max Song’s timeline since ninth grade: work, builds, research, music and school, each entry where it happened.",
        "tags": [
          "pages"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/Accept"
          }
        ],
        "responses": {
          "200": {
            "description": "The page as HTML, or as Markdown when the Accept header prefers text/markdown.",
            "content": {
              "text/html": {
                "schema": {
                  "type": "string"
                }
              },
              "text/markdown": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/playground/": {
      "get": {
        "operationId": "getPlayground",
        "summary": "Playground",
        "description": "Demos by Max Song you can open and try, from AI workspaces to a physics lab.",
        "tags": [
          "pages"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/Accept"
          }
        ],
        "responses": {
          "200": {
            "description": "The page as HTML, or as Markdown when the Accept header prefers text/markdown.",
            "content": {
              "text/html": {
                "schema": {
                  "type": "string"
                }
              },
              "text/markdown": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/contact/": {
      "get": {
        "operationId": "getContact",
        "summary": "Contact",
        "description": "Write to Max Song about a project, a question, or something you found here.",
        "tags": [
          "pages"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/Accept"
          }
        ],
        "responses": {
          "200": {
            "description": "The page as HTML, or as Markdown when the Accept header prefers text/markdown.",
            "content": {
              "text/html": {
                "schema": {
                  "type": "string"
                }
              },
              "text/markdown": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/privacy/": {
      "get": {
        "operationId": "getPrivacy",
        "summary": "Privacy",
        "description": "What this site collects when you visit, the cookies it uses, who handles your data, and how to ask about it.",
        "tags": [
          "pages"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/Accept"
          }
        ],
        "responses": {
          "200": {
            "description": "The page as HTML, or as Markdown when the Accept header prefers text/markdown.",
            "content": {
              "text/html": {
                "schema": {
                  "type": "string"
                }
              },
              "text/markdown": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/robots.txt": {
      "get": {
        "operationId": "getRobotsTxt",
        "summary": "robots.txt",
        "description": "Crawl rules and AI usage preferences (Content-Signal, Content-Usage): every path may be crawled; search, AI input and AI training are allowed site-wide except on the paths the file reserves.",
        "tags": [
          "discovery"
        ],
        "responses": {
          "200": {
            "description": "robots.txt (text/plain).",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/sitemap.xml": {
      "get": {
        "operationId": "getSitemap",
        "summary": "Sitemap",
        "description": "Every canonical page URL with changefreq and priority; lastmod is included when a content date is recorded.",
        "tags": [
          "discovery"
        ],
        "responses": {
          "200": {
            "description": "Sitemap (application/xml).",
            "content": {
              "application/xml": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/rss.xml": {
      "get": {
        "operationId": "getRssFeed",
        "summary": "Journal feed",
        "description": "RSS 2.0 feed of the Journal timeline: one item per entry, linking to its place on /journal/.",
        "tags": [
          "discovery"
        ],
        "responses": {
          "200": {
            "description": "Journal feed (application/xml).",
            "content": {
              "application/xml": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/llms.txt": {
      "get": {
        "operationId": "getLlmsTxt",
        "summary": "llms.txt",
        "description": "A plain-text summary of the whole site for language models (llmstxt.org format).",
        "tags": [
          "discovery"
        ],
        "responses": {
          "200": {
            "description": "llms.txt (text/plain).",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/.well-known/api-catalog": {
      "get": {
        "operationId": "getApiCatalog",
        "summary": "API catalog",
        "description": "This API catalog (RFC 9727 linkset).",
        "tags": [
          "discovery"
        ],
        "responses": {
          "200": {
            "description": "API catalog (application/linkset+json; profile=\"https://www.rfc-editor.org/info/rfc9727\").",
            "content": {
              "application/linkset+json": {
                "schema": {
                  "$ref": "#/components/schemas/Linkset"
                }
              }
            },
            "headers": {
              "Link": {
                "description": "RFC 9727 §2: the catalog advertises itself with rel=\"api-catalog\" (sent on GET and HEAD).",
                "schema": {
                  "type": "string",
                  "example": "<https://maxsong.me/.well-known/api-catalog>; rel=\"api-catalog\""
                }
              }
            }
          }
        }
      }
    },
    "/api-docs/openapi.json": {
      "get": {
        "operationId": "getOpenApi",
        "summary": "OpenAPI description",
        "description": "The OpenAPI 3.1 document describing every endpoint listed here.",
        "tags": [
          "discovery"
        ],
        "responses": {
          "200": {
            "description": "OpenAPI description (application/json).",
            "content": {
              "application/json": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/healthz": {
      "get": {
        "operationId": "getHealth",
        "summary": "Health probe",
        "description": "Constant \"ok\" while the origin is reachable. Never cached.",
        "tags": [
          "status"
        ],
        "responses": {
          "200": {
            "description": "The origin is up.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string",
                  "const": "ok"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "parameters": {
      "Accept": {
        "name": "Accept",
        "in": "header",
        "required": false,
        "description": "Send text/markdown to receive the page as Markdown (converted at the edge). Anything else returns HTML.",
        "schema": {
          "type": "string",
          "enum": [
            "text/html",
            "text/markdown"
          ],
          "default": "text/html"
        }
      }
    },
    "schemas": {
      "Linkset": {
        "description": "RFC 9264 linkset carrying an RFC 9727 API catalog.",
        "type": "object",
        "required": [
          "linkset"
        ],
        "properties": {
          "linkset": {
            "type": "array",
            "minItems": 1,
            "items": {
              "type": "object",
              "required": [
                "anchor"
              ],
              "properties": {
                "anchor": {
                  "type": "string",
                  "format": "uri"
                },
                "service-desc": {
                  "$ref": "#/components/schemas/LinkTargets"
                },
                "service-doc": {
                  "$ref": "#/components/schemas/LinkTargets"
                },
                "status": {
                  "$ref": "#/components/schemas/LinkTargets"
                }
              },
              "additionalProperties": true
            }
          }
        }
      },
      "LinkTargets": {
        "type": "array",
        "items": {
          "type": "object",
          "required": [
            "href"
          ],
          "properties": {
            "href": {
              "type": "string",
              "format": "uri"
            },
            "type": {
              "type": "string"
            },
            "title": {
              "type": "string"
            }
          },
          "additionalProperties": true
        }
      }
    }
  }
}
