{
  "openapi": "3.1.0",
  "info": {
    "title": "PetPulse API",
    "description": "Global pet health and care intelligence API. AI-synthesized veterinary symptom triage, breed selection guides, pet nutrition analysis, medication safety (drug interactions, toxin exposure), senior pet care, travel preparation, insurance comparison, and cost estimation. Backed by current veterinary literature via real-time search. Serves pet owners, veterinary clinics, and pet-focused AI agents worldwide. Chewy + pet insurance affiliate links auto-appended to purchase-relevant endpoints. All endpoints support any language via ?lang=. Pricing: $0.05\u2013$0.10 USDC/call via x402 micropayment.",
    "version": "1.2.0",
    "contact": {
      "url": "https://petpulse-alpha.vercel.app"
    }
  },
  "servers": [
    {
      "url": "https://petpulse-alpha.vercel.app"
    }
  ],
  "components": {
    "securitySchemes": {
      "x402": {
        "type": "apiKey",
        "in": "header",
        "name": "PAYMENT-SIGNATURE",
        "description": "x402 payment signature. Omit to receive a 402 with payment requirements. Sign and retry to receive data."
      }
    }
  },
  "paths": {
    "/api/pet/symptoms": {
      "get": {
        "summary": "Symptom triage",
        "description": "Returns urgency rating (emergency / urgent / monitor / routine), possible causes, signs that require immediate care, and home monitoring guidance.",
        "operationId": "petSymptoms",
        "security": [
          {
            "x402": []
          }
        ],
        "parameters": [
          {
            "name": "symptoms",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Comma-separated symptoms (e.g. lethargy,vomiting)"
          },
          {
            "name": "species",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "default": "dog"
            },
            "description": "Animal species"
          },
          {
            "name": "age",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Pet age (e.g. 8 years)"
          },
          {
            "name": "weight",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Pet weight (e.g. 65lbs)"
          },
          {
            "name": "lang",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Response language (e.g. es, de, fr)"
          }
        ],
        "responses": {
          "200": {
            "description": "Triage result with urgency rating and guidance"
          },
          "402": {
            "description": "Payment required \u2014 x402 PAYMENT-REQUIRED header contains payment details"
          }
        },
        "x-agent-use-case": "on-demand",
        "x-agent-chaining": "Highest-urgency endpoint \u2014 always includes telehealth vet affiliate link; chain to /api/pet/medication if toxin or medication concern is flagged; pairs with /api/pet/insurance to surface coverage for emergency visit",
        "x-price-usd": 0.1
      }
    },
    "/api/pet/research": {
      "get": {
        "summary": "Veterinary research synthesis",
        "description": "Synthesizes PubMed peer-reviewed research on any pet health or nutrition topic with evidence quality ratings.",
        "operationId": "petResearch",
        "security": [
          {
            "x402": []
          }
        ],
        "parameters": [
          {
            "name": "topic",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Research topic (e.g. joint-supplements, omega-3-benefits)"
          },
          {
            "name": "species",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "default": "dog"
            }
          },
          {
            "name": "lang",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Research synthesis with evidence ratings and product recommendations"
          },
          "402": {
            "description": "Payment required"
          }
        },
        "x-agent-use-case": "on-demand",
        "x-agent-chaining": "Long-form research endpoint \u2014 pairs with /api/pet/breed for evidence-based breed selection; pairs with /api/pet/nutrition for dietary research",
        "x-price-usd": 0.1
      }
    },
    "/api/pet/nutrition": {
      "get": {
        "summary": "Condition-based nutrition guidance",
        "description": "Evidence-based dietary guidance for pets with specific health conditions \u2014 foods to emphasize, foods to avoid, supplements, and prescription diet options.",
        "operationId": "petNutrition",
        "security": [
          {
            "x402": []
          }
        ],
        "parameters": [
          {
            "name": "condition",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Health condition (e.g. pancreatitis, kidney-disease, obesity)"
          },
          {
            "name": "species",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "default": "dog"
            }
          },
          {
            "name": "lang",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Dietary guidance with food lists, supplements, and purchase links"
          },
          "402": {
            "description": "Payment required"
          }
        },
        "x-agent-use-case": "on-demand",
        "x-agent-chaining": "Pairs with /api/pet/symptoms if diet-related symptoms are present; chain to /api/pet/cost for food budget estimates; Chewy autoship links included for ongoing supply",
        "x-price-usd": 0.08
      }
    },
    "/api/pet/medication": {
      "get": {
        "summary": "Veterinary drug reference",
        "description": "Dosage context, mechanism of action, side effects, contraindications, drug interactions, and FDA adverse event data for veterinary medications.",
        "operationId": "petMedication",
        "security": [
          {
            "x402": []
          }
        ],
        "parameters": [
          {
            "name": "drug",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Drug name (e.g. carprofen, metronidazole, apoquel)"
          },
          {
            "name": "species",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "default": "dog"
            }
          },
          {
            "name": "weight",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Pet weight for dosing context (e.g. 65lbs, 30kg)"
          },
          {
            "name": "condition",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "lang",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Drug reference with FDA adverse event data"
          },
          "402": {
            "description": "Payment required"
          }
        },
        "x-agent-use-case": "on-demand",
        "x-agent-chaining": "High-safety endpoint \u2014 drug interaction and toxin queries; pairs with /api/pet/symptoms for prescription context; PetMeds affiliate included for Rx procurement",
        "x-price-usd": 0.1
      }
    },
    "/api/pet/breed": {
      "get": {
        "summary": "Breed health and care guide",
        "description": "Breed-specific health risks, genetic conditions, nutrition notes, exercise requirements, recommended vet screenings, and product recommendations.",
        "operationId": "petBreed",
        "security": [
          {
            "x402": []
          }
        ],
        "parameters": [
          {
            "name": "breed",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Breed name (e.g. golden-retriever, french-bulldog, maine-coon)"
          },
          {
            "name": "topic",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "health",
                "nutrition",
                "exercise",
                "grooming"
              ],
              "default": "health"
            }
          },
          {
            "name": "lang",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Breed guide with health risks, care recommendations, and purchase links"
          },
          "402": {
            "description": "Payment required"
          }
        },
        "x-agent-use-case": "on-demand",
        "x-agent-chaining": "Run at start of pet acquisition; chain to /api/pet/cost for lifetime cost estimate; pairs with /api/pet/nutrition for breed-specific dietary needs",
        "x-price-usd": 0.08
      }
    }
  }
}