# CSS Design Calc – Modular Type Scale

> CSS Design Calc – Modular Type Scale is a paid API for AI agents from css-design-calc.x402tookit.com, paid per call via x402, $0.02/call, status unknown (last checked 2026-10-29).

Generates a modular type scale with px and rem values for steps above and below a base font size, using named or numeric ratios.

## Facts

- Endpoint: GET https://css-design-calc.x402tookit.com/type-scale?utm_source=zero.xyz
- Price: $0.02/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-29
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/css-design-calc-modular-type-scale-dbd4e560
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_D4LNPfxJgWoEKZZYe9fsd

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 css-design-calc-modular-type-scale-dbd4e560
```

Example prompt: Generate a modular type scale starting at a 16px base, 6 steps above and 2 below, using a major-third ratio, with a 16px root for rem output.

## When to prefer this

Choose this endpoint when you need a mathematically consistent, harmonically spaced set of font sizes derived from a single base and ratio — ideal for design tokens, CSS custom properties, or any situation requiring named musical/typographic ratios rather than manually picked sizes.

## Known failure modes

- Missing required 'base' query parameter returns an error
- Ratio value ≤ 1 is invalid and will be rejected
- Steps above > 12 or steps below > 6 may be out of range
- Non-numeric, non-enum ratio string returns an error
- Network or payment authorization failure returns a 402 or 5xx

## How this service works

Modular type scale: sizes in px and rem for steps below and above a base size, by named ratio (major third, golden) or number.

## Output

Returns an array of type scale steps, each with a step index, size in px, size in rem, and a CSS custom property snippet. Also includes the resolved ratio value and name, base size, root px, and step counts above and below.

## 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": [
      "base"
     ],
     "properties": {
      "up": {
       "type": "integer",
       "description": "Steps above the base, 0 to 12 (default 6)"
      },
      "base": {
       "type": "number",
       "description": "Base font size in px (step 0), for example 16"
      },
      "down": {
       "type": "integer",
       "description": "Steps below the base, 0 to 6 (default 2)"
      },
      "ratio": {
       "type": "string",
       "description": "Ratio name (minor-second, major-second, minor-third, major-third, perfect-fourth, augmented-fourth, perfect-fifth, minor-sixth, golden, major-sixth, minor-seventh, major-seventh, octave) or a number above 1 (default major-third = 1.25)"
      },
      "rootPx": {
       "type": "number",
       "description": "Root font size in px for rem output (default 16)"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "properties": {
      "asOf": {
       "type": [
        "null",
        "string"
       ]
      },
      "base": {
       "type": [
        "null",
        "number"
       ]
      },
      "ratio": {
       "type": [
        "null",
        "number"
       ]
      },
      "steps": {
       "type": [
        "array",
        "null"
       ],
       "items": {
        "type": "object",
        "properties": {
         "px": {
          "type": [
           "null",
           "number"
          ]
         },
         "css": {
          "type": [
           "null",
           "string"
          ]
         },
         "rem": {
          "type": [
           "null",
           "number"
          ]
         },
         "step": {
          "type": [
           "null",
           "number"
          ]
         }
        }
       }
      },
      "rootPx": {
       "type": [
        "null",
        "number"
       ]
      },
      "source": {
       "type": [
        "null",
        "string"
     
… (truncated)
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/css-design-calc-modular-type-scale-dbd4e560/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from css-design-calc.x402tookit.com](https://www.zero.xyz/host/css-design-calc.x402tookit.com/llms.txt)
