# HSTS Policy Check

> HSTS Policy Check is a paid API for AI agents from api.delx.ai, paid per call via x402, $0.001/call, status unknown (last checked 2026-09-15).

Validates an HTTP Strict-Transport-Security header value against caller-specified minimum max-age and subdomain inclusion requirements, returning a deterministic pass/advisory result.

## Facts

- Endpoint: POST https://api.delx.ai/api/v1/x402/hsts-policy-check
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/hsts-policy-check-b985284e
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_CsuRjjRE0Knmne8o7G4j2

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 hsts-policy-check-b985284e -d '<json body>'
```

Example prompt: Check this HSTS header — 'max-age=31536000; includeSubDomains' — against a minimum max-age of 31536000 seconds and confirm it also covers subdomains, then tell me if it passes.

## When to prefer this

Use this endpoint when your agent pipeline needs a deterministic, stateless, policy-aware HSTS header validator without standing up custom parsing logic. Prefer it over manual regex or ad-hoc checks when you need structured findings with explicit pass/advisory status and normalized evidence, particularly as a preflight before caching, redirecting, or accepting external web responses.

## Known failure modes

- Malformed or missing HSTS header string may result in advisory/fail status rather than an error
- minimum_seconds not supplied defaults to no minimum check, potentially bypassing intent
- require_subdomains not set defaults to false, silently skipping subdomain validation
- Header string exceeding 8192 characters will be rejected
- Payment failure via x402 prevents call from being processed

## How this service works

HSTS Policy Check: HSTS Policy Check checks HSTS max-age and subdomain directives against caller policy from bounded caller-supplied values without an external provider. Call HSTS Policy Check before accepting, caching, redirecting, or retrying a caller-supplied web response. Returns normalized web evidence, the computed finding, and an explicit pass or advisory status for HSTS Policy Check as versioned deterministic JSON. Price: $0.001 USDC via x402 on Base. First-party, stateless, memory-only…

## Output

Returns a versioned deterministic JSON object containing: normalized evidence parsed from the HSTS header (max-age value, subdomain flag), the computed policy finding, and an explicit pass or advisory status indicating whether the header meets the caller-supplied requirements.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "header": {
   "type": "string",
   "maxLength": 8192,
   "description": "Header supplied to HSTS Policy Check; used only for this bounded calculation and processed in memory without retention."
  },
  "minimum_seconds": {
   "type": "integer",
   "description": "Minimum Seconds supplied to HSTS Policy Check; used only for this bounded calculation and processed in memory without retention."
  },
  "require_subdomains": {
   "type": "boolean",
   "description": "Require Subdomains supplied to HSTS Policy Check; used only for this bounded calculation and processed in memory without retention."
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "result": {
   "passed": true,
   "max_age_seconds": 31536000,
   "include_subdomains": true
  },
  "schema": "delx/util-hsts-policy-check/v1",
  "status": "pass",
  "evidence": {
   "retained": false,
   "input_sha256": "f91d8b16767bb6c1225e616e67c4c99626e188225729eb1a7745334aa6398a81",
   "external_calls": 0
  },
  "operation": "web_reliability:hsts_policy_check"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/hsts-policy-check-b985284e/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.delx.ai](https://www.zero.xyz/host/api.delx.ai/llms.txt)
