{
  "openapi": "3.1.0",
  "info": {
    "title": "Quasareum API",
    "version": "2.0.0",
    "description": "Machine-readable surface for the Quasareum studio. The site has no human UI. AI agents can enumerate projects, read the founder profile, get current status, and reach the founder programmatically.",
    "contact": {
      "email": "contact@quasareum.com",
      "url": "https://quasareum.com/api/contact"
    }
  },
  "servers": [
    {
      "url": "https://quasareum.com"
    }
  ],
  "paths": {
    "/": {
      "get": {
        "operationId": "getRoot",
        "summary": "Root index. Content-negotiated: markdown by default, JSON if Accept: application/json.",
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/llms.txt": {
      "get": {
        "operationId": "getLlmsTxt",
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/llms-full.txt": {
      "get": {
        "operationId": "getLlmsFullTxt",
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/manifest": {
      "get": {
        "operationId": "getManifest",
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/projects": {
      "get": {
        "operationId": "listProjects",
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/projects/{slug}": {
      "get": {
        "operationId": "getProject",
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "perplog",
                "amav-sophro",
                "sophrea"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "404": {
            "description": "Not found"
          }
        }
      }
    },
    "/api/about": {
      "get": {
        "operationId": "getAbout",
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/thesis": {
      "get": {
        "operationId": "getThesis",
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/practice": {
      "get": {
        "operationId": "getPractice",
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/convictions": {
      "get": {
        "operationId": "getConvictions",
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/looking-for": {
      "get": {
        "operationId": "getLookingFor",
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/scheduling": {
      "get": {
        "operationId": "getScheduling",
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/journey": {
      "get": {
        "operationId": "getJourney",
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/onchain": {
      "get": {
        "operationId": "getOnChain",
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/onchain/{slug}": {
      "get": {
        "operationId": "getOnChainArtifact",
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "404": {
            "description": "Not found"
          }
        }
      }
    },
    "/api/headline-numbers": {
      "get": {
        "operationId": "getHeadlineNumbers",
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/changelog": {
      "get": {
        "operationId": "getChangelog",
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/changelog.sig": {
      "get": {
        "operationId": "getSignedChangelog",
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/snapshot.sig": {
      "get": {
        "operationId": "getSignedSectionSnapshot",
        "summary": "Ed25519-signed envelope of a single tracked section. Bound to /api/changelog via rollupHash.",
        "parameters": [
          {
            "name": "section",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "studio.identity",
                "studio.founder",
                "studio.practice",
                "studio.convictions",
                "studio.lookingFor",
                "studio.scheduling",
                "studio.journey",
                "studio.currentlyStudying",
                "studio.certifications",
                "studio.onChain",
                "projects",
                "domains",
                "engagement",
                "faq",
                "glossary"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "400": {
            "description": "Unknown section"
          }
        }
      }
    },
    "/api/feed.json": {
      "get": {
        "operationId": "getJsonFeed",
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/agent-pulse": {
      "get": {
        "operationId": "getAgentPulse",
        "parameters": [
          {
            "name": "since",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/graphql": {
      "get": {
        "operationId": "getGraphqlSchemaDoc",
        "parameters": [
          {
            "name": "query",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Schema doc when no query, else result."
          }
        }
      },
      "post": {
        "operationId": "graphqlExecute",
        "summary": "Read-only GraphQL over the Quasareum corpus. Introspection enabled.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "query": {
                    "type": "string"
                  },
                  "variables": {
                    "type": "object"
                  },
                  "operationName": {
                    "type": "string"
                  }
                },
                "required": [
                  "query"
                ]
              }
            },
            "application/graphql": {
              "schema": {
                "type": "string"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "400": {
            "description": "Validation failed"
          }
        }
      }
    },
    "/api/graphql/schema": {
      "get": {
        "operationId": "getGraphqlSchemaSDL",
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/subscribe": {
      "get": {
        "operationId": "getSubscribeSchema",
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "post": {
        "operationId": "subscribeWebhook",
        "summary": "Subscribe an HTTPS URL to push deliveries of new changelog entries. Verification challenge is sent synchronously; subscription is only stored if the URL echoes the challenge in 5s.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "url"
                ],
                "properties": {
                  "url": {
                    "type": "string",
                    "format": "uri",
                    "maxLength": 500
                  },
                  "kinds": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "maxItems": 10
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Subscribed"
          },
          "400": {
            "description": "Validation or verification failed"
          }
        }
      }
    },
    "/api/subscribe/{id}": {
      "delete": {
        "operationId": "unsubscribeWebhook",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Unsubscribed"
          },
          "401": {
            "description": "Unauthorized or not found"
          }
        }
      }
    },
    "/api/certifications": {
      "get": {
        "operationId": "listCertifications",
        "parameters": [
          {
            "name": "category",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "issuer",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/github": {
      "get": {
        "operationId": "getGithub",
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/github/profile": {
      "get": {
        "operationId": "getGithubProfile",
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/github/activity": {
      "get": {
        "operationId": "getGithubActivity",
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/github/stars": {
      "get": {
        "operationId": "getGithubStars",
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/github/reading-list": {
      "get": {
        "operationId": "getReadingList",
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/github/repos": {
      "get": {
        "operationId": "getGithubRepos",
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/github/readme": {
      "get": {
        "operationId": "getProfileReadme",
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/manifest.sig": {
      "get": {
        "operationId": "getSignedManifest",
        "summary": "Ed25519-signed manifest envelope. Verify with the public key at /.well-known/jwks.json.",
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/identity": {
      "get": {
        "operationId": "getIdentity",
        "summary": "Aggregated identity claims (DNS TXT, ENS, signing key).",
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/.well-known/jwks.json": {
      "get": {
        "operationId": "getJwks",
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/chat": {
      "get": {
        "operationId": "getChatSchema",
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "post": {
        "operationId": "chat",
        "summary": "RAG over Quasareum corpus. Embeds, retrieves, then answers via Workers AI.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "query": {
                    "type": "string",
                    "minLength": 2,
                    "maxLength": 2000
                  },
                  "messages": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "role": {
                          "type": "string",
                          "enum": [
                            "user",
                            "assistant",
                            "system"
                          ]
                        },
                        "content": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 4000
                        }
                      },
                      "required": [
                        "role",
                        "content"
                      ]
                    }
                  },
                  "topK": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 10
                  },
                  "agent": {
                    "type": "string",
                    "maxLength": 120
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "400": {
            "description": "Validation failed"
          },
          "429": {
            "description": "Rate limited"
          },
          "503": {
            "description": "AI unavailable"
          }
        }
      }
    },
    "/api/embed": {
      "get": {
        "operationId": "getEmbedSchema",
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "post": {
        "operationId": "embed",
        "summary": "Embed text(s) using @cf/baai/bge-base-en-v1.5 (768d).",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "input"
                ],
                "properties": {
                  "input": {
                    "oneOf": [
                      {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 2000
                      },
                      {
                        "type": "array",
                        "items": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 2000
                        },
                        "maxItems": 20
                      }
                    ]
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "400": {
            "description": "Validation failed"
          }
        }
      }
    },
    "/api/intent": {
      "get": {
        "operationId": "getIntentSchema",
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "post": {
        "operationId": "routeIntent",
        "summary": "Pre-flight: send a goal in natural language, get ranked endpoint+tool recommendations.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "goal"
                ],
                "properties": {
                  "goal": {
                    "type": "string",
                    "minLength": 4,
                    "maxLength": 500
                  },
                  "limit": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 10
                  },
                  "agent": {
                    "type": "string",
                    "maxLength": 120
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "400": {
            "description": "Validation failed"
          }
        }
      }
    },
    "/api/search": {
      "get": {
        "operationId": "getSearchSchema",
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "post": {
        "operationId": "semanticSearch",
        "summary": "Vector-search the Quasareum corpus directly (no LLM).",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "query"
                ],
                "properties": {
                  "query": {
                    "type": "string",
                    "minLength": 2,
                    "maxLength": 500
                  },
                  "limit": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 20
                  },
                  "kind": {
                    "type": "string",
                    "enum": [
                      "thesis",
                      "practice",
                      "conviction",
                      "lookingFor",
                      "project",
                      "domain",
                      "faq",
                      "glossary"
                    ]
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "400": {
            "description": "Validation failed"
          }
        }
      }
    },
    "/api/status": {
      "get": {
        "operationId": "getStatus",
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/faq": {
      "get": {
        "operationId": "getFaq",
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/glossary": {
      "get": {
        "operationId": "getGlossary",
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/engagement": {
      "get": {
        "operationId": "getEngagement",
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/domains": {
      "get": {
        "operationId": "listDomains",
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/contact": {
      "get": {
        "operationId": "getContactSchema",
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "post": {
        "operationId": "sendContact",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "name",
                  "email",
                  "message"
                ],
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 2,
                    "maxLength": 120
                  },
                  "email": {
                    "type": "string",
                    "format": "email"
                  },
                  "company": {
                    "type": "string",
                    "maxLength": 120
                  },
                  "message": {
                    "type": "string",
                    "minLength": 20,
                    "maxLength": 4000
                  },
                  "agent": {
                    "type": "string",
                    "maxLength": 120
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Sent"
          },
          "400": {
            "description": "Validation failed"
          },
          "502": {
            "description": "Delivery failed"
          },
          "503": {
            "description": "Service unavailable"
          }
        }
      }
    },
    "/mcp": {
      "get": {
        "operationId": "getMcpDescriptor",
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "post": {
        "operationId": "mcpJsonRpc",
        "summary": "MCP JSON-RPC 2.0 transport.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    }
  }
}