# Accept Header Rank

> Accept Header Rank 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).

Ranks offered media types against weighted HTTP Accept header ranges to determine the best match for content negotiation

## Facts

- Endpoint: POST https://api.delx.ai/api/v1/x402/accept-header-rank
- 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/accept-header-rank-040d4ae2
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_Cb5iC2CeMi8TpkZJoTUnl

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 accept-header-rank-040d4ae2 -d '<json body>'
```

Example prompt: Rank my offered media types ['application/json', 'text/html', 'application/xml'] against the Accept header 'text/html;q=0.9, application/json;q=1.0, */*;q=0.5' and tell me which one wins and whether it's a pass.

## When to prefer this

Choose this endpoint when you need deterministic, stateless HTTP content negotiation ranking without standing up your own parser — especially before caching, redirecting, or retrying responses where the correct media type selection is critical. Prefer it over rolling custom logic when you need an auditable, versioned, normalized result with explicit pass/advisory status rather than a raw match result.

## Known failure modes

- Malformed Accept header string causes parsing failure or unexpected ranking
- Offers array is empty resulting in no match found
- Accept header exceeds 8192 character limit returning validation error
- Offers array exceeds 256 items limit
- Wildcard-only Accept header produces advisory rather than pass status
- Payment of 0.001 USDC not confirmed causing 402 rejection

## How this service works

Accept Header Rank: Accept Header Rank ranks offered media types against weighted Accept ranges from bounded caller-supplied values without an external provider. Call Accept Header Rank 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 Accept Header Rank as versioned deterministic JSON. Price: $0.001 USDC via x402 on Base. First-party, stateless, memory-only execu…

## Output

Returns a versioned deterministic JSON object containing normalized web evidence about the Accept header and offers, the computed ranking finding (which offer best satisfies the weighted Accept ranges), and an explicit pass or advisory status indicating whether the match is clean or approximate.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "header": {
   "type": "string",
   "maxLength": 8192,
   "description": "Header supplied to Accept Header Rank; used only for this bounded calculation and processed in memory without retention."
  },
  "offers": {
   "type": "array",
   "items": {
    "type": "string",
    "maxLength": 8192
   },
   "maxItems": 256,
   "description": "Offers supplied to Accept Header Rank; used only for this bounded calculation and processed in memory without retention."
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "result": {
   "ranked": [
    {
     "offer": "application/json",
     "quality": 1
    },
    {
     "offer": "text/plain",
     "quality": 0.5
    }
   ],
   "selected": "application/json"
  },
  "schema": "delx/util-accept-header-rank/v1",
  "status": "pass",
  "evidence": {
   "retained": false,
   "input_sha256": "6f60834b6ddd258ebac619ec48677f1ee272c525d95ebcd2374e0b3d4e7daba8",
   "external_calls": 0
  },
  "operation": "web_reliability:accept_header_rank"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/accept-header-rank-040d4ae2/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)
