{
  "openapi": "3.1.0",
  "info": {
    "title": "Ailurn developer resources",
    "summary": "Public HTTP catalog for the Ailurn AI learning workspace. Not a course-generation API.",
    "description": "Ailurn is a web product: humans sign up, describe a learning goal, and get a structured course. This OpenAPI document lists the unauthenticated machine-readable resources agents should use. Authenticated /api/course and /api/auth routes are for the Ailurn session cookie and are not a stable third-party API.",
    "version": "1.0.0",
    "contact": {
      "name": "Ailurn",
      "url": "https://www.ailurn.com/developers",
      "email": "support@ailurn.com"
    }
  },
  "servers": [
    {
      "url": "https://www.ailurn.com",
      "description": "Ailurn production"
    }
  ],
  "tags": [
    {
      "name": "Discovery",
      "description": "Agent indexes and instructions"
    },
    {
      "name": "Content",
      "description": "Markdown content negotiation"
    }
  ],
  "paths": {
    "/llms.txt": {
      "get": {
        "tags": [
          "Discovery"
        ],
        "summary": "Ailurn llms.txt",
        "description": "llmstxt.org index: when to use Ailurn, and links to Markdown resources.",
        "operationId": "getLlmsTxt",
        "responses": {
          "200": {
            "description": "Markdown index",
            "content": {
              "text/markdown": {
                "schema": {
                  "type": "string"
                }
              },
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/llms-full.txt": {
      "get": {
        "tags": [
          "Discovery"
        ],
        "summary": "Expanded Ailurn agent context",
        "operationId": "getLlmsFullTxt",
        "responses": {
          "200": {
            "description": "Markdown",
            "content": {
              "text/markdown": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/agent-instructions.md": {
      "get": {
        "tags": [
          "Discovery"
        ],
        "summary": "Ailurn agent instructions (when to use)",
        "operationId": "getAgentInstructions",
        "responses": {
          "200": {
            "description": "Markdown instructions",
            "content": {
              "text/markdown": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/developers": {
      "get": {
        "tags": [
          "Discovery"
        ],
        "summary": "Ailurn developer resources",
        "operationId": "getDeveloperResources",
        "responses": {
          "200": {
            "description": "HTML or Markdown via content negotiation",
            "content": {
              "text/html": {
                "schema": {
                  "type": "string"
                }
              },
              "text/markdown": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/developers/openapi.json": {
      "get": {
        "tags": [
          "Discovery"
        ],
        "summary": "This OpenAPI document",
        "operationId": "getOpenApi",
        "responses": {
          "200": {
            "description": "OpenAPI 3.1 JSON",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    },
    "/sitemap.xml": {
      "get": {
        "tags": [
          "Discovery"
        ],
        "summary": "Public sitemap",
        "operationId": "getSitemap",
        "responses": {
          "200": {
            "description": "XML sitemap",
            "content": {
              "application/xml": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/{path}": {
      "get": {
        "tags": [
          "Content"
        ],
        "summary": "Public page (HTML or Markdown)",
        "description": "Send `Accept: text/markdown` to receive Markdown. Unsupported types with no overlap return 406. Missing paths return 404 with a Markdown recovery body when Markdown is requested.",
        "operationId": "getPublicPage",
        "parameters": [
          {
            "name": "path",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Public path without a leading slash. Empty for home."
          },
          {
            "name": "Accept",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "examples": [
                "text/html",
                "text/markdown"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Page representation",
            "headers": {
              "Vary": {
                "schema": {
                  "type": "string",
                  "example": "Accept, Accept-Encoding"
                }
              }
            },
            "content": {
              "text/html": {
                "schema": {
                  "type": "string"
                }
              },
              "text/markdown": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "Unknown path — recovery links in the body"
          },
          "406": {
            "description": "No acceptable representation"
          }
        }
      }
    }
  }
}