# Content Type Match

> Content Type Match 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 whether an actual HTTP Content-Type header value matches an expected media range, returning a deterministic pass/fail result.

## Facts

- Endpoint: POST https://api.delx.ai/api/v1/x402/content-type-match
- 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/content-type-match-195a58f6
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_yCqfE4tObQ2TNjqYn4c3R

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 content-type-match-195a58f6 -d '<json body>'
```

Example prompt: Check whether the actual Content-Type 'text/html; charset=utf-8' matches the expected media range 'text/html' and tell me if it passes.

## When to prefer this

Choose this endpoint when you need a lightweight, deterministic, stateless check of whether an HTTP Content-Type value satisfies a given media range — particularly as a preflight guard before accepting, caching, redirecting, or retrying a web response. Prefer it over hand-coded string matching when you need normalized evidence and an explicit pass/advisory result returned as structured JSON. It is best suited for agentic pipelines that need verifiable, auditable content-type validation without side effects or external dependencies.

## Known failure modes

- Malformed or unparseable Content-Type string in 'actual' field may yield an advisory/fail status rather than an error
- Expected media range that is syntactically invalid may cause a validation error
- Overly long input strings exceeding the 8192 character limit will be rejected
- Missing required fields ('actual' or 'expected') will cause a bad request error
- Payment failure via x402 will block the call before validation occurs

## How this service works

Content Type Match: Content Type Match checks a concrete Content-Type against an expected media range from bounded caller-supplied values without an external provider. Call Content Type Match 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 Content Type Match as versioned deterministic JSON. Price: $0.001 USDC via x402 on Base. First-party, stateless, memory-only…

## Output

Returns a deterministic JSON object containing: the normalized actual and expected content-type values as web evidence, the computed match finding (whether actual satisfies the expected media range), and an explicit pass or advisory status — all versioned and stateless.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "actual": {
   "type": "string",
   "maxLength": 8192,
   "description": "Actual supplied to Content Type Match; used only for this bounded calculation and processed in memory without retention."
  },
  "expected": {
   "type": "string",
   "maxLength": 8192,
   "description": "Expected supplied to Content Type Match; used only for this bounded calculation and processed in memory without retention."
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "result": {
   "matched": true,
   "expected_range": "application/*+json",
   "actual_media_type": "application/problem+json"
  },
  "schema": "delx/util-content-type-match/v1",
  "status": "pass",
  "evidence": {
   "retained": false,
   "input_sha256": "b7c613a2c98fff13f2ac6da517851a23617d85340d45c743194249ef9f57070f",
   "external_calls": 0
  },
  "operation": "web_reliability:content_type_match"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/content-type-match-195a58f6/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)
