# Rectangle Area, Perimeter & Diagonal Calculator

> Rectangle Area, Perimeter & Diagonal Calculator is a paid API for AI agents from geometry.openverbs.com, paid per call via x402, $0.004/call, status unknown (last checked 2026-09-15).

Computes the area, perimeter, and diagonal of a rectangle given its width and height.

## Facts

- Endpoint: POST https://geometry.openverbs.com/v1/rectangle
- Price: $0.004/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/rectangle-area-perimeter-diagonal-calculator-f8f2b1c3
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_o6tX7kvKuM9rT05Zu_-kE

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 rectangle-area-perimeter-diagonal-calculator-f8f2b1c3 -d '<json body>'
```

Example prompt: What is the area, perimeter, and diagonal of a rectangle that is 12 units wide and 7 units tall?

## When to prefer this

Use this endpoint when you need a quick, reliable computation of rectangle properties — area, perimeter, and diagonal — without implementing the math yourself. It is ideal for agentic workflows, educational tools, or applications that need geometry calculations as a microservice. Prefer it over the sibling circle or triangle endpoints when the shape is specifically rectangular (four right angles, two pairs of equal sides).

## Known failure modes

- Width or height is zero or negative — the schema enforces exclusiveMinimum of 0, so invalid values will be rejected
- Missing required fields (width or height) will result in a validation error
- Non-numeric inputs for width or height will cause a schema validation failure

## How this service works

Area, perimeter and diagonal of a rectangle from its width and height.

## Output

Returns the computed area (width × height), perimeter (2 × (width + height)), and diagonal (√(width² + height²)) of the rectangle as numeric values.

## 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",
    "bodyType",
    "body"
   ],
   "properties": {
    "body": {
     "type": "object",
     "required": [
      "width",
      "height"
     ],
     "properties": {
      "width": {
       "type": "number",
       "description": "Rectangle width.",
       "exclusiveMinimum": 0
      },
      "height": {
       "type": "number",
       "description": "Rectangle height.",
       "exclusiveMinimum": 0
      }
     },
     "additionalProperties": false
    },
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "POST"
     ],
     "type": "string"
    },
    "bodyType": {
     "enum": [
      "json",
      "form-data",
      "text"
     ],
     "type": "string"
    }
   },
   "additionalProperties": false
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/rectangle-area-perimeter-diagonal-calculator-f8f2b1c3/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from geometry.openverbs.com](https://www.zero.xyz/host/geometry.openverbs.com/llms.txt)
