# URL Port Policy Check

> URL Port 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-13).

Validates a URL's effective port against a caller-supplied allowlist and returns a deterministic pass/advisory verdict as versioned JSON

## Facts

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

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 url-port-policy-check-3de55427 -d '<json body>'
```

Example prompt: Before I cache this response, check whether the URL 'http://example.com:8080/path' has a port that's on my allowlist of [80, 443, 8080] and tell me if it passes policy.

## When to prefer this

Use this endpoint when you need a stateless, deterministic, first-party port policy check on a caller-supplied URL without building your own parsing logic. Ideal before accepting, caching, redirecting, or retrying any external URL in an agent pipeline where port enforcement is a security requirement. Prefer this over general URL validation endpoints when port allowlisting is specifically needed, and over custom code when you want versioned, auditable JSON output with explicit pass/advisory verdicts.

## Known failure modes

- URL is malformed or unparseable — endpoint may return an error or advisory status
- allowed_ports array exceeds 256 items — rejected per schema constraints
- URL string exceeds 8192 characters — rejected per schema constraints
- URL has no explicit port and default port inference may vary
- Non-integer values in allowed_ports array cause validation errors

## How this service works

URL Port Policy Check: URL Port Policy Check checks a URL effective port against a caller allowlist from bounded caller-supplied values without an external provider. Call URL Port 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 URL Port Policy Check as versioned deterministic JSON. Price: $0.001 USDC via x402 on Base. First-party, stateless, memory-…

## Output

Returns a versioned deterministic JSON object containing: the normalized URL evidence (extracted port info), the computed policy finding, and an explicit pass or advisory status indicating whether the URL's effective port is within the caller-supplied allowlist.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "url": {
   "type": "string",
   "maxLength": 8192,
   "description": "URL supplied to URL Port Policy Check; used only for this bounded calculation and processed in memory without retention."
  },
  "allowed_ports": {
   "type": "array",
   "items": {
    "type": "integer"
   },
   "maxItems": 256,
   "description": "Allowed Ports supplied to URL Port Policy Check; used only for this bounded calculation and processed in memory without retention."
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "result": {
   "allowed": true,
   "effective_port": 8443
  },
  "schema": "delx/util-url-port-policy-check/v1",
  "status": "pass",
  "evidence": {
   "retained": false,
   "input_sha256": "3c3ea04a21ed18c950af0adf058569fc48c74f8beaa16d9066f239014d36a638",
   "external_calls": 0
  },
  "operation": "web_reliability:url_port_policy_check"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/url-port-policy-check-3de55427/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)
