{
  "openapi": "3.1.0",
  "info": {
    "title": "Success Casting Agent Commerce API",
    "version": "1.0.0",
    "description": "Foundry RFQ, catalog, and agent-payable analysis endpoints for Success Casting (www.successcasting.com)."
  },
  "servers": [
    {
      "url": "https://www.successcasting.com"
    }
  ],
  "x-service-info": {
    "categories": [
      "industrial",
      "foundry",
      "b2b",
      "manufacturing"
    ],
    "merchant": "Success Casting"
  },
  "paths": {
    "/api/ai/quote": {
      "post": {
        "operationId": "createRfqQuote",
        "summary": "Generate a foundry RFQ estimate from specifications",
        "description": "Free-tier RFQ guidance for casting projects. Paid rush analysis is available via /api/v1.",
        "x-payment-info": {
          "intent": "charge",
          "method": "card",
          "amount": "0",
          "currency": "THB",
          "description": "Complimentary RFQ estimate for foundry buyers and agents"
        },
        "responses": {
          "200": {
            "description": "RFQ estimate payload"
          }
        }
      }
    },
    "/api/v1": {
      "get": {
        "operationId": "getAgentRfqAnalysis",
        "summary": "Agent-paid detailed RFQ analysis (x402)",
        "description": "Returns detailed casting analysis after x402 payment. Agents discover payment terms via HTTP 402.",
        "x-payment-info": {
          "intent": "charge",
          "method": "card",
          "amount": "2.50",
          "currency": "USD",
          "description": "Detailed RFQ analysis for autonomous agents"
        },
        "responses": {
          "200": {
            "description": "Paid RFQ analysis JSON"
          },
          "402": {
            "description": "Payment required (x402)"
          }
        }
      }
    },
    "/api/commerce/checkout-sessions": {
      "post": {
        "operationId": "createCheckoutSession",
        "summary": "Create an agent checkout session for foundry RFQ follow-up",
        "x-payment-info": {
          "intent": "session",
          "method": "stripe",
          "amount": "0",
          "currency": "THB",
          "description": "Checkout session for RFQ escalation — human sales follow-up"
        },
        "responses": {
          "200": {
            "description": "Checkout session created"
          }
        }
      }
    }
  }
}