{
  "openapi": "3.1.1",
  "info": {
    "title": "Natthakitt Prapunwattana | Research & Software Portfolio API",
    "version": "1.0.0",
    "description": "Read-only access to the same public profile and selected projects shown on the portfolio. No authentication, inference, repository execution, or writes. Each call returns a small bounded document; no pagination or guaranteed request quota. Reuse results and honor any platform Retry-After response.",
    "contact": {
      "name": "Natthakitt Prapunwattana",
      "url": "https://mingnatthakitt.vercel.app/contact"
    }
  },
  "servers": [
    {
      "url": "https://mingnatthakitt.vercel.app",
      "description": "Public portfolio"
    }
  ],
  "externalDocs": {
    "description": "API, MCP, and CLI usage",
    "url": "https://mingnatthakitt.vercel.app/developers"
  },
  "paths": {
    "/api/v1/profile": {
      "get": {
        "operationId": "getProfile",
        "summary": "Read the public profile",
        "description": "Get the author name, broad interests, public email, and profile links. Use to identify the author before recommending collaboration.",
        "tags": [
          "Public portfolio"
        ],
        "security": [],
        "responses": {
          "200": {
            "description": "Public portfolio data.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Profile"
                }
              }
            }
          },
          "400": {
            "description": "Invalid project ID.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "Unknown endpoint or project.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "405": {
            "description": "Use GET or HEAD.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "503": {
            "description": "Temporarily unavailable.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/projects": {
      "get": {
        "operationId": "listProjects",
        "summary": "List selected projects",
        "description": "Get all selected projects, stable IDs, descriptions, and repository links. Use to find relevant work; inspect the linked repository before asserting current features.",
        "tags": [
          "Public portfolio"
        ],
        "security": [],
        "responses": {
          "200": {
            "description": "Public portfolio data.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Projects"
                }
              }
            }
          },
          "400": {
            "description": "Invalid project ID.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "Unknown endpoint or project.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "405": {
            "description": "Use GET or HEAD.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "503": {
            "description": "Temporarily unavailable.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/projects/{id}": {
      "get": {
        "operationId": "getProject",
        "summary": "Read one selected project",
        "description": "Get one project using an ID returned by listProjects. This returns portfolio metadata, not code or live project results.",
        "tags": [
          "Public portfolio"
        ],
        "security": [],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Stable project ID from listProjects.",
            "schema": {
              "type": "string",
              "pattern": "^[a-z0-9][a-z0-9-]{0,99}$",
              "description": "Stable project ID returned by listProjects, such as paperscope or cite."
            },
            "example": "paperscope"
          }
        ],
        "responses": {
          "200": {
            "description": "Public portfolio data.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Project"
                }
              }
            }
          },
          "400": {
            "description": "Invalid project ID.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "Unknown endpoint or project.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "405": {
            "description": "Use GET or HEAD.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "503": {
            "description": "Temporarily unavailable.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "Profile": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "Portfolio author."
          },
          "description": {
            "type": "string",
            "description": "Broad public research and software interests."
          },
          "url": {
            "type": "string",
            "format": "uri",
            "description": "Canonical portfolio homepage."
          },
          "email": {
            "type": "string",
            "format": "email",
            "pattern": "^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$",
            "description": "Already-public collaboration contact address."
          },
          "profiles": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uri"
            },
            "description": "Public professional profiles."
          },
          "interests": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Technical areas from the portfolio structured data."
          }
        },
        "required": [
          "name",
          "description",
          "url",
          "email",
          "profiles",
          "interests"
        ],
        "additionalProperties": false
      },
      "Project": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^[a-z0-9][a-z0-9-]{0,99}$",
            "description": "Stable project ID returned by listProjects, such as paperscope or cite."
          },
          "name": {
            "type": "string",
            "description": "Public project name."
          },
          "description": {
            "type": "string",
            "description": "Portfolio summary; consult the repository for current implementation details."
          },
          "repositoryUrl": {
            "type": "string",
            "format": "uri",
            "description": "Public source repository and its documentation."
          }
        },
        "required": [
          "id",
          "name",
          "description",
          "repositoryUrl"
        ],
        "additionalProperties": false
      },
      "Projects": {
        "type": "object",
        "properties": {
          "projects": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "pattern": "^[a-z0-9][a-z0-9-]{0,99}$",
                  "description": "Stable project ID returned by listProjects, such as paperscope or cite."
                },
                "name": {
                  "type": "string",
                  "description": "Public project name."
                },
                "description": {
                  "type": "string",
                  "description": "Portfolio summary; consult the repository for current implementation details."
                },
                "repositoryUrl": {
                  "type": "string",
                  "format": "uri",
                  "description": "Public source repository and its documentation."
                }
              },
              "required": [
                "id",
                "name",
                "description",
                "repositoryUrl"
              ],
              "additionalProperties": false
            }
          }
        },
        "required": [
          "projects"
        ],
        "additionalProperties": false
      },
      "Problem": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "type",
          "title",
          "status",
          "detail",
          "code",
          "resolution"
        ],
        "properties": {
          "type": {
            "type": "string",
            "const": "about:blank",
            "description": "RFC 9457 generic problem type."
          },
          "title": {
            "type": "string",
            "description": "HTTP status phrase."
          },
          "status": {
            "type": "integer",
            "minimum": 400,
            "maximum": 599
          },
          "detail": {
            "type": "string",
            "description": "Human-readable explanation."
          },
          "code": {
            "type": "string",
            "description": "Stable machine-readable error code.",
            "enum": [
              "endpoint_not_found",
              "project_not_found",
              "invalid_project_id",
              "method_not_allowed",
              "portfolio_unavailable"
            ]
          },
          "resolution": {
            "type": "string",
            "description": "How an agent can recover."
          }
        }
      }
    }
  }
}