# Stair Layout Calculator

> Stair Layout Calculator is a paid API for AI agents from construction-calc.x402tookit.com, paid per call via x402, $0.02/call, status unknown (last checked 2026-10-30).

Calculates stair layout from total rise: number of risers, exact riser height, tread depth, total run, stringer length, angle, and building code compliance check.

## Facts

- Endpoint: GET https://construction-calc.x402tookit.com/stair-calc?utm_source=zero.xyz
- Price: $0.02/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-30
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/stair-layout-calculator-f2c1a182
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_haY_jXUg78RTTLr2JnDNH

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability stair-layout-calculator-f2c1a182
```

Example prompt: I need to lay out a staircase for a floor-to-floor height of 108 inches — can you calculate the number of risers, exact riser height, total run, stringer length, and angle, and tell me if it passes code? I'd like a tread depth of 10 inches and a target riser of 7.5 inches.

## When to prefer this

Use this endpoint when you need to compute a complete stair layout from a known floor-to-floor height, including code compliance validation. It is purpose-built for construction planning and returns all critical stair geometry in a single call, making it ideal for agents assisting with residential or deck construction design. Prefer this over general math tools when you need building-code awareness alongside the geometric calculations.

## Known failure modes

- Missing required totalRiseIn parameter returns an error
- Very small or zero totalRiseIn values may produce nonsensical riser counts
- Extremely large total rise values may exceed practical stair design limits
- targetRiserIn values outside typical code range (4–8 inches) may trigger code failure flags
- Non-numeric input for query parameters causes a validation error

## How this service works

Stair layout from total rise: number of risers, exact riser height, total run, stringer length, angle and a code check.

## Output

Returns a structured object with: number of risers and treads, exact riser height in inches, tread depth in inches, total run in both feet and inches, stringer length in inches, stair angle in degrees, a comfort rule value and pass/fail flag, a code compliance verdict with reasons, a list of any issues, a human-readable summary, and optional disclaimer or degraded-service flags.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "totalRiseIn"
     ],
     "properties": {
      "totalRiseIn": {
       "type": "number",
       "description": "Floor-to-floor height in inches"
      },
      "treadDepthIn": {
       "type": "number",
       "description": "Tread depth in inches, default 10"
      },
      "targetRiserIn": {
       "type": "number",
       "description": "Preferred riser height, default 7.5"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "properties": {
      "asOf": {
       "type": [
        "null",
        "string"
       ]
      },
      "issues": {
       "type": [
        "array",
        "null"
       ]
      },
      "risers": {
       "type": [
        "null",
        "number"
       ]
      },
      "source": {
       "type": [
        "null",
        "string"
       ]
      },
      "treads": {
       "type": [
        "null",
        "number"
       ]
      },
      "reasons": {
       "type": [
        "array",
        "null"
       ],
       "items": {
        "type": "string"
       }
      },
      "summary": {
       "type": [
        "null",
        "string"
       ]
      },
      "verdict": {
       "type": [
        "null",
        "string"
       ]
      },
      "angleDeg": {
       "type": [
        "null",
        "number"
       ]
      },
      "degraded": {
       "type": [
        "boolean",
        "null"
       ]
      },
      "disclaimer": {
       "type": [
        "null",
        "string"
       ]
      },
      "notChecked": {
       "type": [
        "array",
        "null"
       ],
       "items": {
        "type": "string"
       }
      },
      "totalRunFt": {
       "type": [
        "null",
        "number"
       ]
      },
      "totalRunIn": {
       "type": [
        "null",
        "number"
       ]
      },
      "comfortRule": {
       "type": [
        "null",
        "number"
       ]
      },
… (truncated)
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/stair-layout-calculator-f2c1a182/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from construction-calc.x402tookit.com](https://www.zero.xyz/host/construction-calc.x402tookit.com/llms.txt)
