{
  "openapi": "3.1.0",
  "info": {
    "title": "ProbeLine API",
    "version": "1.1.0",
    "description": "Agent-payable periodontal and dental implant reference: 2017 AAP/EFP diagnosis, periodontal risk (PRA), ICD-10-CM lookup, peri-implant status, implant specs, identification and component compatibility. Paid routes return HTTP 402 with an x402 PAYMENT-REQUIRED header; pay in USDC on Base and retry with PAYMENT-SIGNATURE. Send no patient identifiers. Clinical decision support for licensed dental professionals; ICD-10-CM only, no CDT content.",
    "contact": {
      "name": "ProbeLine",
      "email": "ryan@probeline.io",
      "url": "https://probeline.io"
    }
  },
  "paths": {
    "/v1/perio/diagnose": {
      "post": {
        "summary": "Stage, extent, grade and ICD-10-CM suggestions from a 6-point chart",
        "x-price-usd": "0.25",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DiagnoseRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Diagnosis with rationale, flags and documentation checklist"
          },
          "400": {
            "description": "Validation errors"
          },
          "402": {
            "description": "Payment required (x402)"
          }
        },
        "x-payment-info": {
          "protocols": [
            "x402"
          ],
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.25"
          }
        }
      }
    },
    "/v1/implants": {
      "get": {
        "summary": "Search implant systems (free)",
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Free text, e.g. 'nobel conical'"
          },
          {
            "name": "manufacturer",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "connection",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "status",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "current",
                "discontinued"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Matching systems (summary fields)"
          }
        },
        "security": []
      }
    },
    "/v1/implants/{id}": {
      "get": {
        "summary": "Full spec for one implant system",
        "x-price-usd": "0.05",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Implant record with sources"
          },
          "402": {
            "description": "Payment required (x402)"
          },
          "404": {
            "description": "Unknown id"
          }
        },
        "x-payment-info": {
          "protocols": [
            "x402"
          ],
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.05"
          }
        }
      }
    },
    "/v1/implants/identify": {
      "post": {
        "summary": "Rank likely implant systems from observed features",
        "x-price-usd": "0.10",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "connection_type": {
                    "type": "string",
                    "description": "e.g. 'internal hex', 'external hex', 'conical', 'morse taper', 'tri-channel'"
                  },
                  "platform_diameter_mm": {
                    "type": "number"
                  },
                  "body_diameter_mm": {
                    "type": "number"
                  },
                  "body_shape": {
                    "type": "string",
                    "enum": [
                      "tapered",
                      "parallel",
                      "hybrid"
                    ]
                  },
                  "level": {
                    "type": "string",
                    "enum": [
                      "bone",
                      "tissue"
                    ]
                  },
                  "manufacturer_hint": {
                    "type": "string"
                  },
                  "limit": {
                    "type": "integer",
                    "maximum": 20
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Ranked candidates with reasons"
          },
          "402": {
            "description": "Payment required (x402)"
          }
        },
        "x-payment-info": {
          "protocols": [
            "x402"
          ],
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.10"
          }
        }
      }
    },
    "/v1/icd10": {
      "get": {
        "summary": "ICD-10-CM lookup for periodontal and implant conditions",
        "operationId": "lookupIcd10",
        "parameters": [
          {
            "name": "code",
            "in": "query",
            "required": false,
            "schema": {
              "description": "Exact ICD-10-CM code, e.g. 'K05.323'",
              "type": "string"
            },
            "description": "Exact ICD-10-CM code, e.g. 'K05.323'"
          },
          {
            "name": "q",
            "in": "query",
            "required": false,
            "schema": {
              "description": "Free text, e.g. 'generalized severe periodontitis' or 'peri-implantitis'",
              "type": "string"
            },
            "description": "Free text, e.g. 'generalized severe periodontitis' or 'peri-implantitis'"
          },
          {
            "name": "condition",
            "in": "query",
            "required": false,
            "schema": {
              "description": "Structured mapping; combine with the qualifiers below",
              "type": "string",
              "enum": [
                "periodontitis",
                "gingivitis",
                "recession",
                "tooth_loss_periodontal",
                "peri_implantitis",
                "implant_failure",
                "horizontal_bone_loss",
                "diabetes_with_periodontal_disease"
              ]
            },
            "description": "Structured mapping; combine with the qualifiers below"
          },
          {
            "name": "stage",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "I",
                "II",
                "III",
                "IV"
              ]
            }
          },
          {
            "name": "extent",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "localized",
                "generalized"
              ]
            }
          },
          {
            "name": "severity",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "slight",
                "minimal",
                "moderate",
                "severe",
                "unspecified"
              ]
            }
          },
          {
            "name": "molar_incisor_pattern",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "acute",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "non_plaque_induced",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "complete",
            "in": "query",
            "required": false,
            "schema": {
              "description": "tooth_loss_periodontal: complete (edentulous) vs partial",
              "type": "boolean"
            },
            "description": "tooth_loss_periodontal: complete (edentulous) vs partial"
          },
          {
            "name": "kennedy_class",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "I",
                "II",
                "III",
                "IV",
                "unspecified"
              ]
            }
          },
          {
            "name": "failure_type",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "osseointegration",
                "biological",
                "mechanical",
                "other"
              ]
            }
          },
          {
            "name": "diabetes_type",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 2
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": -9007199254740991,
              "maximum": 50
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Matching codes with titles, billable flag and mapping reason"
          },
          "400": {
            "description": "Validation errors"
          },
          "402": {
            "description": "Payment required (x402)"
          }
        },
        "x-price-usd": "0.05",
        "x-payment-info": {
          "protocols": [
            "x402"
          ],
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.05"
          }
        }
      }
    },
    "/v1/perio/risk": {
      "post": {
        "summary": "Periodontal risk assessment (Lang & Tonetti PRA)",
        "operationId": "assessPeriodontalRisk",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "bop_percent": {
                    "description": "% of sites bleeding on probing",
                    "type": "number",
                    "minimum": 0,
                    "maximum": 100
                  },
                  "sites_pd_5_plus": {
                    "description": "Number of sites with PD >= 5 mm",
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  "teeth_lost": {
                    "description": "Teeth lost of 28 (excluding third molars)",
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 28
                  },
                  "bone_loss_pct": {
                    "description": "Worst-site radiographic bone loss, % of root length",
                    "type": "number",
                    "minimum": 0,
                    "maximum": 100
                  },
                  "age": {
                    "type": "number"
                  },
                  "smoking": {
                    "type": "object",
                    "properties": {
                      "status": {
                        "type": "string",
                        "enum": [
                          "never",
                          "former",
                          "current"
                        ]
                      },
                      "cigarettes_per_day": {
                        "type": "number"
                      },
                      "years_since_quit": {
                        "type": "number"
                      }
                    },
                    "required": [
                      "status"
                    ],
                    "additionalProperties": false
                  },
                  "systemic": {
                    "type": "object",
                    "properties": {
                      "diabetes": {
                        "type": "boolean"
                      },
                      "genetic_marker": {
                        "type": "boolean"
                      },
                      "other": {
                        "type": "boolean"
                      }
                    },
                    "additionalProperties": false
                  },
                  "teeth": {
                    "description": "Optional tooth-level findings for prognostic factor flags",
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "tooth": {
                          "type": "integer",
                          "minimum": 1,
                          "maximum": 32
                        },
                        "max_pd": {
                          "type": "number"
                        },
                        "bone_loss_pct": {
                          "type": "number"
                        },
                        "furcation": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 3
                        },
                        "mobility": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 3
                        },
                        "vertical_defect_mm": {
                          "type": "number"
                        },
                        "crown_root_ratio_unfavorable": {
                          "type": "boolean"
                        },
                        "endo_perio_lesion": {
                          "type": "boolean"
                        },
                        "root_proximity": {
                          "type": "boolean"
                        },
                        "caries_or_restorability_concern": {
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "tooth"
                      ],
                      "additionalProperties": false
                    }
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Risk vectors, patient risk, rule applied, maintenance interval, tooth-level factors"
          },
          "400": {
            "description": "Validation errors"
          },
          "402": {
            "description": "Payment required (x402)"
          }
        },
        "x-price-usd": "0.15",
        "x-payment-info": {
          "protocols": [
            "x402"
          ],
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.15"
          }
        }
      }
    },
    "/v1/implants/peri-implant": {
      "post": {
        "summary": "Peri-implant status by 2017 World Workshop case definitions",
        "operationId": "assessPeriImplant",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "bop": {
                    "description": "Bleeding on gentle probing",
                    "type": "boolean"
                  },
                  "suppuration": {
                    "type": "boolean"
                  },
                  "max_pd_mm": {
                    "type": "number"
                  },
                  "baseline_pd_mm": {
                    "description": "PD after prosthesis delivery, if known",
                    "type": "number"
                  },
                  "bone_level_mm": {
                    "description": "Radiographic bone level apical to the most coronal intraosseous part (no-baseline pathway)",
                    "type": "number"
                  },
                  "bone_loss_since_baseline_mm": {
                    "description": "Bone loss vs baseline radiograph, if known",
                    "type": "number"
                  },
                  "implant_length_mm": {
                    "type": "number"
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Status, pathway, criteria, severity, ICD-10-CM"
          },
          "400": {
            "description": "Validation errors"
          },
          "402": {
            "description": "Payment required (x402)"
          }
        },
        "x-price-usd": "0.15",
        "x-payment-info": {
          "protocols": [
            "x402"
          ],
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.15"
          }
        }
      }
    },
    "/v1/implants/compatibility": {
      "post": {
        "summary": "Implant component compatibility",
        "operationId": "getComponentCompatibility",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "description": "Implant id from search_implants"
                  },
                  "platform": {
                    "description": "Platform name, e.g. 'NP'",
                    "type": "string"
                  }
                },
                "required": [
                  "id"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Native components, declared compatibility with sources, unverified similar interfaces"
          },
          "400": {
            "description": "Validation errors"
          },
          "402": {
            "description": "Payment required (x402)"
          },
          "404": {
            "description": "Unknown implant id"
          }
        },
        "x-price-usd": "0.10",
        "x-payment-info": {
          "protocols": [
            "x402"
          ],
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.10"
          }
        }
      }
    },
    "/v1/reference/implant-complications": {
      "get": {
        "summary": "Implant complication reference (free)",
        "operationId": "implantComplications",
        "parameters": [
          {
            "name": "id",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "category",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "biological",
                "mechanical"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Definitions, findings, ICD-10-CM codes"
          }
        },
        "security": []
      }
    }
  },
  "components": {
    "schemas": {
      "DiagnoseRequest": {
        "type": "object",
        "required": [
          "chart"
        ],
        "properties": {
          "patient": {
            "type": "object",
            "properties": {
              "age": {
                "type": "number"
              },
              "smoking": {
                "type": "object",
                "properties": {
                  "status": {
                    "enum": [
                      "never",
                      "former",
                      "current"
                    ]
                  },
                  "cigarettes_per_day": {
                    "type": "number"
                  }
                }
              },
              "diabetes": {
                "type": "object",
                "properties": {
                  "diagnosed": {
                    "type": "boolean"
                  },
                  "hba1c": {
                    "type": "number"
                  }
                }
              }
            }
          },
          "teeth_lost_to_perio": {
            "type": "integer",
            "minimum": 0
          },
          "remaining_teeth": {
            "type": "integer",
            "description": "Defaults to number of teeth charted"
          },
          "longitudinal": {
            "type": "object",
            "properties": {
              "loss_mm": {
                "type": "number"
              },
              "years": {
                "type": "number"
              },
              "measure": {
                "enum": [
                  "CAL",
                  "bone"
                ]
              }
            }
          },
          "phenotype": {
            "enum": [
              "destruction_exceeds_biofilm",
              "heavy_biofilm_low_destruction"
            ]
          },
          "complexity": {
            "type": "object",
            "properties": {
              "ridge_defect": {
                "enum": [
                  "none",
                  "moderate",
                  "severe"
                ]
              },
              "needs_complex_rehab": {
                "type": "boolean"
              },
              "masticatory_dysfunction": {
                "type": "boolean"
              },
              "secondary_occlusal_trauma": {
                "type": "boolean"
              },
              "bite_collapse": {
                "type": "boolean"
              },
              "drifting_flaring": {
                "type": "boolean"
              }
            }
          },
          "chart": {
            "type": "array",
            "description": "One entry per present tooth. Site order for all 6-value arrays: [distofacial, facial, mesiofacial, distolingual, lingual, mesiolingual].",
            "items": {
              "type": "object",
              "required": [
                "tooth",
                "pd"
              ],
              "properties": {
                "tooth": {
                  "type": "integer",
                  "minimum": 1,
                  "maximum": 32,
                  "description": "Universal numbering"
                },
                "pd": {
                  "type": "array",
                  "items": {
                    "type": "number"
                  },
                  "minItems": 6,
                  "maxItems": 6
                },
                "rec": {
                  "type": "array",
                  "items": {
                    "type": "number"
                  },
                  "minItems": 6,
                  "maxItems": 6,
                  "description": "Recession; positive = margin apical to CEJ"
                },
                "cal": {
                  "type": "array",
                  "items": {
                    "type": "number"
                  },
                  "minItems": 6,
                  "maxItems": 6,
                  "description": "Measured CAL; overrides pd+rec"
                },
                "bop": {
                  "type": "array",
                  "items": {
                    "type": "boolean"
                  },
                  "minItems": 6,
                  "maxItems": 6
                },
                "mobility": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 3
                },
                "furcation": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 3,
                  "description": "Worst furcation class"
                },
                "rbl_pct": {
                  "type": "number",
                  "description": "Radiographic bone loss at worst site, % of root length"
                },
                "vertical_defect_mm": {
                  "type": "number"
                }
              }
            }
          }
        }
      }
    }
  },
  "servers": [
    {
      "url": "https://probeline.io"
    }
  ]
}
