{
  "openapi": "3.1.0",
  "info": {
    "title": "GlowPulse API",
    "description": "Real-time skincare and K-beauty ingredient intelligence. All endpoints require x402 payment (USDC on Base mainnet or Solana) via the PAYMENT-SIGNATURE header. Grounded in EU CosIng, CIR/PubChem, AAD dermatology guidance, and Korean MFDS regulatory context \u2014 never scraped from INCIDecoder/CosDNA.",
    "version": "1.0.0",
    "contact": {
      "name": "The Aslan Group LLC",
      "email": "info@theaslangroupllc.com",
      "url": "https://glowpulse-nine.vercel.app"
    }
  },
  "servers": [
    {
      "url": "https://glowpulse-nine.vercel.app"
    }
  ],
  "components": {
    "securitySchemes": {
      "x402": {
        "type": "apiKey",
        "in": "header",
        "name": "PAYMENT-SIGNATURE",
        "description": "x402 payment signature. Send a GET request without this header to receive a 402 with payment requirements. Sign the payment and retry with the PAYMENT-SIGNATURE header."
      }
    }
  },
  "paths": {
    "/api/glow/ingredient-lookup": {
      "get": {
        "summary": "Skincare ingredient checker",
        "description": "What is a given INCI ingredient and is it safe? Function, EU CosIng status, CIR/PubChem safety verdict, comedogenicity rating (concentration-caveated), and pregnancy-safety flag.",
        "operationId": "ingredientLookup",
        "x-agent-use-case": "on-demand \u2014 the atomic unit other endpoints compose from",
        "parameters": [
          {
            "name": "inci_name",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "INCI ingredient name, e.g. Niacinamide, Retinol, Sodium Hyaluronate"
          },
          {
            "name": "lang",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "en | ko | ja | de | fr | es | pt"
          }
        ],
        "responses": {
          "200": {
            "description": "Ingredient intelligence brief (JSON)"
          },
          "402": {
            "description": "Payment required \u2014 x402 USDC on Base or Solana."
          }
        },
        "x-price-usd": 0.05
      }
    },
    "/api/glow/conflict-check": {
      "get": {
        "summary": "Routine ingredient-conflict checker",
        "description": "Myth-vs-fact verdict on ingredient/active pairings in a routine \u2014 real pH/oxidation conflicts flagged separately from debunked myths (retinol+vitamin C, niacinamide+AHA), plus a layering-order suggestion.",
        "operationId": "conflictCheck",
        "x-agent-use-case": "on-demand",
        "parameters": [
          {
            "name": "ingredients",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Comma-separated ingredients/actives, e.g. retinol,vitamin c,niacinamide"
          },
          {
            "name": "lang",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Conflict analysis (JSON)"
          },
          "402": {
            "description": "Payment required \u2014 x402 USDC on Base or Solana."
          }
        },
        "x-price-usd": 0.1
      }
    },
    "/api/glow/product-decode": {
      "get": {
        "summary": "Ingredient list decoder",
        "description": "Paste a product's ingredient list \u2014 full INCI breakdown, actives vs. fillers, marketing-claim reality check, conflict flags, pregnancy-safe and fungal-acne-safe flags in one call.",
        "operationId": "productDecode",
        "x-agent-use-case": "on-demand \u2014 the power endpoint for agents",
        "parameters": [
          {
            "name": "product_name",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "ingredients_pasted",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Full pasted INCI ingredient list text \u2014 recommended for best accuracy"
          },
          {
            "name": "lang",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Product decode (JSON)"
          },
          "402": {
            "description": "Payment required \u2014 x402 USDC on Base or Solana."
          }
        },
        "x-price-usd": 0.15
      }
    },
    "/api/glow/pregnancy-safe": {
      "get": {
        "summary": "Pregnancy/nursing skincare safety screen",
        "description": "AAD-informed pregnancy and nursing safety screen for ingredients or a product \u2014 flagged ingredients, safe alternatives, always recommends OB/derm consultation.",
        "operationId": "pregnancySafe",
        "x-agent-use-case": "on-demand \u2014 safety-adjacent, always recommends professional consultation",
        "parameters": [
          {
            "name": "ingredients_or_product",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "lang",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Pregnancy safety screen (JSON)"
          },
          "402": {
            "description": "Payment required \u2014 x402 USDC on Base or Solana."
          }
        },
        "x-price-usd": 0.1
      }
    },
    "/api/glow/fungal-acne-check": {
      "get": {
        "summary": "Fungal-acne (Malassezia) safety checker",
        "description": "Malassezia-safe ingredient screen grounded in lipid-chain-length mycology literature \u2014 flagged vs. safe ingredients.",
        "operationId": "fungalAcneCheck",
        "x-agent-use-case": "on-demand",
        "parameters": [
          {
            "name": "ingredients",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Comma-separated INCI ingredients"
          },
          {
            "name": "lang",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Fungal-acne screen (JSON)"
          },
          "402": {
            "description": "Payment required \u2014 x402 USDC on Base or Solana."
          }
        },
        "x-price-usd": 0.08
      }
    },
    "/api/glow/dupe-finder": {
      "get": {
        "summary": "K-beauty and skincare dupe finder",
        "description": "Cheaper alternatives to a named product, normalized by active-ingredient concentration (not just INCI overlap), with honest texture/elegance caveats and false-dupe warnings.",
        "operationId": "dupeFinder",
        "x-agent-use-case": "on-demand",
        "parameters": [
          {
            "name": "product_name",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "region",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "US | EU | KR | JP"
          },
          {
            "name": "lang",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Dupe analysis (JSON)"
          },
          "402": {
            "description": "Payment required \u2014 x402 USDC on Base or Solana."
          }
        },
        "x-price-usd": 0.15
      }
    },
    "/api/glow/routine-builder": {
      "get": {
        "summary": "Full skincare routine builder",
        "description": "Full AM/PM routine for skin type, concerns, budget, and climate \u2014 conflict-checked active scheduling.",
        "operationId": "routineBuilder",
        "x-agent-use-case": "on-demand",
        "parameters": [
          {
            "name": "skin_type",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "dry | oily | combination | normal | sensitive"
          },
          {
            "name": "concerns",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Comma-separated, e.g. acne,hyperpigmentation,aging"
          },
          {
            "name": "budget_tier",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "drugstore | mid | prestige | mixed"
          },
          {
            "name": "region",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "For climate context"
          },
          {
            "name": "lang",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Routine plan (JSON)"
          },
          "402": {
            "description": "Payment required \u2014 x402 USDC on Base or Solana."
          }
        },
        "x-price-usd": 0.2
      }
    },
    "/api/glow/k-beauty-compare": {
      "get": {
        "summary": "Korean vs Western actives comparison",
        "description": "Compares a skincare active/concern across Korean (MFDS) and Western (FDA/EU) philosophy, regulatory status, and evidence strength \u2014 honest about under-evidenced K-beauty trend ingredients (PDRN, exosomes, EGF).",
        "operationId": "kBeautyCompare",
        "x-agent-use-case": "on-demand",
        "parameters": [
          {
            "name": "active_name",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "e.g. retinol vs bakuchiol, AHA vs PDRN"
          },
          {
            "name": "lang",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "K-beauty comparison (JSON)"
          },
          "402": {
            "description": "Payment required \u2014 x402 USDC on Base or Solana."
          }
        },
        "x-price-usd": 0.12
      }
    },
    "/api/glow/claims-check": {
      "get": {
        "summary": "Greenwashing / marketing-claim detector",
        "description": "Legal meaning of \"clean\", \"non-toxic\", \"dermatologist-tested\" and whether the ingredient list actually supports the claim \u2014 greenwashing risk level.",
        "operationId": "claimsCheck",
        "x-agent-use-case": "on-demand",
        "parameters": [
          {
            "name": "claims",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Comma-separated marketing claims"
          },
          {
            "name": "product_name",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "lang",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Claims check (JSON)"
          },
          "402": {
            "description": "Payment required \u2014 x402 USDC on Base or Solana."
          }
        },
        "x-price-usd": 0.12
      }
    },
    "/api/glow/price-per-active": {
      "get": {
        "summary": "Price-per-active value analysis",
        "description": "Normalized dollar-per-percent-active-ingredient value analysis across up to 4 products \u2014 the hidden number brands don't publish, never estimated from undisclosed concentration.",
        "operationId": "pricePerActive",
        "x-agent-use-case": "on-demand",
        "parameters": [
          {
            "name": "products",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Comma-separated product names, 1-4"
          },
          {
            "name": "active_focus",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "lang",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Value analysis (JSON)"
          },
          "402": {
            "description": "Payment required \u2014 x402 USDC on Base or Solana."
          }
        },
        "x-price-usd": 0.08
      }
    },
    "/api/glow/sensitive-skin": {
      "get": {
        "summary": "Sensitive-skin irritant/allergen screen",
        "description": "Irritant and allergen check against the EU 26-allergen fragrance list and common contact-dermatitis triggers, with a patch-test recommendation.",
        "operationId": "sensitiveSkin",
        "x-agent-use-case": "on-demand \u2014 safety-adjacent, always recommends a patch test",
        "parameters": [
          {
            "name": "ingredients_or_product",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "lang",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Sensitive-skin screen (JSON)"
          },
          "402": {
            "description": "Payment required \u2014 x402 USDC on Base or Solana."
          }
        },
        "x-price-usd": 0.1
      }
    },
    "/api/glow/sale-timing": {
      "get": {
        "summary": "Beauty retailer sale-timing brief",
        "description": "When and where to buy \u2014 Sephora/Ulta sale calendar tiers, Olive Young and K-beauty retailer cycles, loyalty-tier discounts.",
        "operationId": "saleTiming",
        "x-agent-use-case": "on-demand",
        "parameters": [
          {
            "name": "retailer",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Sephora | Ulta | Olive Young | YesStyle | Stylevana | iHerb | all"
          },
          {
            "name": "region",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "lang",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Sale-timing brief (JSON)"
          },
          "402": {
            "description": "Payment required \u2014 x402 USDC on Base or Solana."
          }
        },
        "x-price-usd": 0.08
      }
    }
  }
}