{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/archstone-dev/json-schema/archstone-dev-public-pricing-schema.json",
  "title": "PublicPricing",
  "x-generated": "2026-11-01",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/archstone-dev-openapi.yaml#/components/schemas/PublicPricing",
  "type": "object",
  "required": [
    "plans",
    "cryptoSavingPercent",
    "freePeriod"
  ],
  "additionalProperties": false,
  "properties": {
    "plans": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/PublicPricingPlan"
      }
    },
    "cryptoSavingPercent": {
      "type": [
        "integer",
        "null"
      ],
      "description": "The largest crypto saving against the card-monthly equivalent, across every priced plan and period, rounded down. Never 0 — null when no crypto price undercuts its card equivalent."
    },
    "freePeriod": {
      "description": "When paid plans open: `null` when this deployment has no free period configured, otherwise the instant paid plans open and the instant the grace period after it ends. The same value `GET /api/capabilities` reports as `billing.freePeriod`, the same for every caller. Added in 1.5.0.",
      "type": [
        "object",
        "null"
      ],
      "required": [
        "opensAt",
        "graceEndsAt"
      ],
      "additionalProperties": false,
      "properties": {
        "opensAt": {
          "type": "string",
          "format": "date-time"
        },
        "graceEndsAt": {
          "type": "string",
          "format": "date-time"
        }
      }
    }
  },
  "$defs": {
    "PublicPricingAllowance": {
      "description": "The hosting allowance a self-serve plan carries by default — the plan's own figures, never a particular customer's add-on. Null on enterprise, which has no shared hosting pool.",
      "type": [
        "object",
        "null"
      ],
      "required": [
        "publishedHostedDeployments",
        "hostedCallPool",
        "runtime"
      ],
      "additionalProperties": false,
      "properties": {
        "publishedHostedDeployments": {
          "type": "integer"
        },
        "hostedCallPool": {
          "type": "integer"
        },
        "runtime": {
          "type": "object",
          "required": [
            "concurrency",
            "requestsPerMinute"
          ],
          "additionalProperties": false,
          "properties": {
            "concurrency": {
              "type": "integer"
            },
            "requestsPerMinute": {
              "type": "integer"
            }
          }
        }
      }
    },
    "PublicPricingCreditPack": {
      "description": "A one-off credit pack for this plan's tier, priced per method (no period).",
      "type": "object",
      "required": [
        "sku",
        "credits",
        "prices"
      ],
      "additionalProperties": false,
      "properties": {
        "sku": {
          "type": "string",
          "enum": [
            "credit_pack_1m",
            "credit_pack_5m"
          ]
        },
        "credits": {
          "type": "integer"
        },
        "prices": {
          "type": "object",
          "required": [
            "card",
            "crypto"
          ],
          "additionalProperties": false,
          "properties": {
            "card": {
              "type": "integer"
            },
            "crypto": {
              "type": "integer"
            }
          }
        }
      }
    },
    "PublicPricingHostingFee": {
      "description": "The flat hosting fee Starter can add: its price per method and period, and the hosted-call pool and runtime it brings. Null when the price list in effect does not sell it yet.",
      "type": [
        "object",
        "null"
      ],
      "required": [
        "prices",
        "hostedCallPool",
        "runtime"
      ],
      "additionalProperties": false,
      "properties": {
        "prices": {
          "type": "object",
          "required": [
            "card",
            "crypto"
          ],
          "additionalProperties": false,
          "properties": {
            "card": {
              "type": "array",
              "items": {
                "$ref": "#/$defs/PublicPricingPeriodPrice"
              }
            },
            "crypto": {
              "type": "array",
              "items": {
                "$ref": "#/$defs/PublicPricingPeriodPrice"
              }
            }
          }
        },
        "hostedCallPool": {
          "type": "integer"
        },
        "runtime": {
          "type": "object",
          "required": [
            "concurrency",
            "requestsPerMinute"
          ],
          "additionalProperties": false,
          "properties": {
            "concurrency": {
              "type": "integer"
            },
            "requestsPerMinute": {
              "type": "integer"
            }
          }
        }
      }
    },
    "PublicPricingPeriodPrice": {
      "type": "object",
      "required": [
        "months",
        "amountCents"
      ],
      "additionalProperties": false,
      "properties": {
        "months": {
          "type": "integer"
        },
        "amountCents": {
          "type": "integer"
        }
      }
    },
    "PublicPricingPlan": {
      "description": "The closed, tenant-free per-plan shape GET /api/v1/pricing (signed out) hands back. No `currentPlan`, `selfServe`, tenant id, or tenant-scoped price-list version identifier is ever present. `includedCalls` is the base plan's ingest fair-use cap, not a hosted-call figure. Hosting capacity is published in `allowance` (every plan; null on enterprise) and `hostingFee` (present on starter only), so the top-level `runtime` is always null. `creditPacks` is present on starter and growth only. Inside a present `hostingFee` or `creditPacks` key, null means the price list in effect does not sell it yet.",
      "type": "object",
      "required": [
        "name",
        "displayPrice",
        "amount",
        "prices",
        "includedCalls",
        "retentionDaysMax",
        "runtime",
        "allowance",
        "support"
      ],
      "additionalProperties": false,
      "properties": {
        "name": {
          "type": "string",
          "enum": [
            "free",
            "starter",
            "growth",
            "enterprise"
          ]
        },
        "displayPrice": {
          "type": "string"
        },
        "amount": {
          "type": [
            "object",
            "null"
          ],
          "required": [
            "amountCents",
            "currency"
          ],
          "additionalProperties": false,
          "properties": {
            "amountCents": {
              "type": "integer"
            },
            "currency": {
              "type": "string",
              "enum": [
                "USD"
              ]
            }
          }
        },
        "prices": {
          "type": [
            "object",
            "null"
          ],
          "additionalProperties": false,
          "properties": {
            "card": {
              "type": "array",
              "items": {
                "$ref": "#/$defs/PublicPricingPeriodPrice"
              }
            },
            "crypto": {
              "type": "array",
              "items": {
                "$ref": "#/$defs/PublicPricingPeriodPrice"
              }
            }
          }
        },
        "includedCalls": {
          "type": [
            "integer",
            "null"
          ]
        },
        "retentionDaysMax": {
          "type": "integer"
        },
        "runtime": {
          "type": [
            "object",
            "null"
          ],
          "required": [
            "concurrency",
            "requestsPerMinute"
          ],
          "additionalProperties": false,
          "properties": {
            "concurrency": {
              "type": "integer"
            },
            "requestsPerMinute": {
              "type": "integer"
            }
          }
        },
        "allowance": {
          "$ref": "#/$defs/PublicPricingAllowance"
        },
        "support": {
          "$ref": "#/$defs/PublicPricingSupport"
        },
        "hostingFee": {
          "$ref": "#/$defs/PublicPricingHostingFee"
        },
        "creditPacks": {
          "type": [
            "array",
            "null"
          ],
          "items": {
            "$ref": "#/$defs/PublicPricingCreditPack"
          }
        },
        "workspaceCap": {
          "type": "integer",
          "description": "Present on growth only: how many workspaces one Growth bill covers, the paying workspace included. Added in 1.3.0."
        }
      }
    },
    "PublicPricingSupport": {
      "type": "object",
      "required": [
        "channel",
        "firstResponseBusinessDays"
      ],
      "additionalProperties": false,
      "properties": {
        "channel": {
          "type": "string",
          "enum": [
            "community",
            "email",
            "priority",
            "contract"
          ]
        },
        "firstResponseBusinessDays": {
          "type": [
            "integer",
            "null"
          ]
        }
      }
    }
  }
}