{"uid":"cap_50MexBUStIr3flqUHZoHw","slug":"accept-language-rank-2fe98e13","name":"Accept Language Rank","description":"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…","url":"https://api.delx.ai/api/v1/x402/accept-language-rank","method":"POST","headers":{},"bodySchema":{"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."}}},"responseSchema":{"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"}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.001","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.001/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_26PJIWYD5XMoemcpGCwpy","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.001","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Ranks a list of offered languages against a weighted Accept-Language HTTP header to determine the best language match for a web response.","exampleAgentPrompt":"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.","exampleUseCases":[{"title":"Multilingual CDN cache key selection","prompt":"Before I cache this response, rank my offered languages ['en', 'es', 'pt-BR'] against the incoming Accept-Language header 'pt;q=1.0, es;q=0.8, en;q=0.3' so I serve and cache the right locale."},{"title":"API gateway language redirect routing","prompt":"I need to redirect this user to the right localized subdomain — my available languages are ['en-GB', 'fr-FR', 'zh-CN'] and their Accept-Language header is 'zh-Hans;q=1.0, fr;q=0.6'. Which should I redirect them to?"},{"title":"Server-side rendering locale selection","prompt":"Before rendering, rank ['en', 'ja', 'ko'] against the Accept-Language header 'ja-JP;q=1.0, ko;q=0.5, en;q=0.2' and tell me which locale to use for server-side rendering this page."}],"resultDescription":"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.","failureModes":["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"],"whenToPreferThis":"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.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-15T07:10:27.175Z","isFirstParty":false}