# Accept Language Rank

> Accept Language 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 a list of offered languages against a weighted Accept-Language HTTP header to determine the best language match for a web response.

## Facts

- Endpoint: POST https://api.delx.ai/api/v1/x402/accept-language-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-language-rank-2fe98e13
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_50MexBUStIr3flqUHZoHw

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-language-rank-2fe98e13 -d '<json body>'
```

Example prompt: Rank these offered languages — ['en-US', 'fr-FR', 'de-DE'] — against the Accept-Language header 'fr;q=0.9, en;q=0.7, de;q=0.5' so I know which one to serve to the client.

## When to prefer this

Choose this endpoint when you need deterministic, stateless, RFC-compliant language negotiation scoring without building your own parser — especially before caching, redirecting, or retrying a response where serving the wrong locale would be costly. Prefer it over rolling a custom solution when you need reproducible, versioned results and an explicit advisory flag for ambiguous cases.

## Known failure modes

- Malformed Accept-Language header may produce an advisory/no-match status rather than a ranked result
- Empty offers array results in no match found
- Header exceeding 8192 characters is rejected
- Offers array exceeding 256 items is rejected
- Unrecognized or non-standard language tags may not match any weighted range

## How this service works

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

## Output

Returns a versioned deterministic JSON object containing: the normalized Accept-Language evidence parsed from the header, the computed ranking of offered languages against the weighted ranges, the top-matching language, and an explicit pass or advisory status indicating whether a confident match was found.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "header": {
   "type": "string",
   "maxLength": 8192,
   "description": "Header supplied to Accept Language 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 Language Rank; used only for this bounded calculation and processed in memory without retention."
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "result": {
   "ranked": [
    {
     "offer": "pt-BR",
     "quality": 1
    },
    {
     "offer": "en",
     "quality": 0.7
    },
    {
     "offer": "es",
     "quality": 0.1
    }
   ],
   "selected": "pt-BR"
  },
  "schema": "delx/util-accept-language-rank/v1",
  "status": "pass",
  "evidence": {
   "retained": false,
   "input_sha256": "30f1c98209164e52a4430cbcc2c488f8df67d504f7b64f9f70e04e87dfc1bb24",
   "external_calls": 0
  },
  "operation": "web_reliability:accept_language_rank"
 }
}
```

## More

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