{
  "tool_id": "ai_product_margin_calculator",
  "slug": "ai-product-margin-calculator",
  "path": "/ai-product-margin-calculator/",
  "mode": "engine_module",
  "usage": "Client-side calculator. Open https://aibizhub.io/ai-product-margin-calculator/ and fill in the inputs; results render in-browser. Also importable as ES module from https://aibizhub.io/engines/ai-product-margin-calculator.js — call compute(input) with the JSON shape below.",
  "methodology": "https://aibizhub.io/methodology/ai-product-margin-calculator/",
  "sample_input": {
    "tool": "ai_product_margin_calculator",
    "subscription_price": 29,
    "avg_api_calls_per_day": 20,
    "avg_input_tokens": 500,
    "avg_output_tokens": 1000,
    "input_cost_per_million": 2.5,
    "output_cost_per_million": 10,
    "hosting_cost_per_user": 0.5,
    "other_per_user_costs": 0.25
  },
  "input_schema": {
    "type": "object",
    "properties": {
      "tool": {
        "type": "string"
      },
      "subscription_price": {
        "type": "number"
      },
      "avg_api_calls_per_day": {
        "type": "number"
      },
      "avg_input_tokens": {
        "type": "number"
      },
      "avg_output_tokens": {
        "type": "number"
      },
      "input_cost_per_million": {
        "type": "number"
      },
      "output_cost_per_million": {
        "type": "number"
      },
      "hosting_cost_per_user": {
        "type": "number"
      },
      "other_per_user_costs": {
        "type": "number"
      }
    },
    "required": [
      "tool",
      "subscription_price",
      "avg_api_calls_per_day",
      "avg_input_tokens",
      "avg_output_tokens",
      "input_cost_per_million",
      "output_cost_per_million",
      "hosting_cost_per_user",
      "other_per_user_costs"
    ]
  },
  "output_schema": {
    "type": "object",
    "properties": {
      "apiCostPerUser": {
        "type": "number"
      },
      "totalCostPerUser": {
        "type": "number"
      },
      "grossMarginPerUser": {
        "type": "number"
      },
      "grossMarginPercent": {
        "type": "number"
      },
      "apiSharePercent": {
        "type": "number"
      },
      "dominantCostDriver": {
        "type": "string"
      },
      "scaleTiers": {
        "type": "array",
        "items": {
          "type": "object",
          "properties": {
            "users": {
              "type": "number"
            },
            "totalRevenue": {
              "type": "number"
            },
            "totalCost": {
              "type": "number"
            },
            "totalProfit": {
              "type": "number"
            },
            "marginPercent": {
              "type": "number"
            }
          }
        }
      },
      "insight": {
        "type": "string"
      }
    }
  }
}
