{
  "openapi": "3.1.0",
  "info": {
    "title": "Pauhu API",
    "version": "0.2.1",
    "description": "Pauhu AI provides full answers with possible next steps, and their sources, through its app, MCP connector and HTTP API. Payments are not open yet.",
    "contact": {
      "url": "https://wa.me/358408668669"
    }
  },
  "servers": [
    {
      "url": "https://api.pauhu.ai/v1",
      "description": "Production"
    }
  ],
  "paths": {
    "/lds/_catalog": {
      "servers": [
        {
          "url": "https://api.pauhu.eu/v1",
          "description": "Pauhu data products (pauhu.eu)"
        }
      ],
      "get": {
        "summary": "Data-product catalogue with exact counts.",
        "parameters": [
          {
            "name": "include",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "health"
              ]
            }
          }
        ]
      }
    },
    "/dcat/catalog/{product_id}": {
      "servers": [
        {
          "url": "https://api.pauhu.eu/v1",
          "description": "Pauhu data products (pauhu.eu)"
        }
      ],
      "get": {
        "summary": "DCAT-AP catalogue of a product (JSON-LD); dcat_url in /v1/lds/_catalog",
        "parameters": [
          {
            "name": "product_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/chat/completions": {
      "post": {
        "summary": "Answer for a prompt. Payments are not open yet.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "messages"
                ],
                "properties": {
                  "model": {
                    "type": "string",
                    "description": "optional"
                  },
                  "messages": {
                    "type": "array",
                    "minItems": 1,
                    "description": "the last message with role user is the question and its content must be a non-empty string; a body with no user message, or whose last user message is empty, is refused as query required",
                    "contains": {
                      "type": "object",
                      "required": [
                        "role",
                        "content"
                      ],
                      "properties": {
                        "role": {
                          "const": "user"
                        },
                        "content": {
                          "type": "string",
                          "minLength": 1
                        }
                      }
                    },
                    "items": {
                      "type": "object",
                      "required": [
                        "role",
                        "content"
                      ],
                      "properties": {
                        "role": {
                          "type": "string",
                          "enum": [
                            "system",
                            "user",
                            "assistant"
                          ]
                        },
                        "content": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              },
              "example": {
                "messages": [
                  {
                    "role": "user",
                    "content": "What does GDPR Article 17 say about erasure?"
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "full answer with possible next steps, and a receipt"
          },
          "402": {
            "description": "Payment required. Payments are not open yet."
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "bearer": {
        "type": "http",
        "scheme": "bearer"
      },
      "apiKey": {
        "type": "apiKey",
        "in": "header",
        "name": "X-API-Key"
      }
    }
  },
  "security": [
    {
      "bearer": []
    },
    {
      "apiKey": []
    }
  ]
}