{"uid":"cap_vgF3ONwWBr-FZ-ZzP_kwV","slug":"delx-commerce-accept-language-rank-f48f0c99","name":"Delx Commerce — Accept-Language Rank","description":"Pay-per-result APIs for agents. No signup. Exact price. Verifiable delivery. USDC on Base + Solana via x402.","url":"https://commerce.delx.ai/api/v1/x402/accept-language-rank?utm_source=zero.xyz","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_DuQUBAfpj75xRRyjObNL2","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 language/locale offer strings against an HTTP Accept-Language header and returns them sorted by quality score with the best match selected","exampleAgentPrompt":"Given this Accept-Language header 'pt-BR,pt;q=0.9,en;q=0.7,es;q=0.1', rank these language offers — 'en', 'pt-BR', 'es', 'fr' — and tell me which one should be selected for the user.","exampleUseCases":[{"title":"Locale selection for multilingual website","prompt":"I have a visitor with the Accept-Language header 'fr-FR,fr;q=0.9,en-US;q=0.8,en;q=0.6' and my site supports 'en', 'fr', 'de', and 'es' — which language should I serve them and in what priority order?"},{"title":"Translation fallback chain for API response","prompt":"My API received a request with Accept-Language 'zh-TW,zh;q=0.8,en;q=0.5' and I can respond in 'en', 'zh-CN', 'zh-TW', or 'ja' — rank those options so I know which translation to use first and what to fall back to."},{"title":"Email campaign language targeting","prompt":"A subscriber's browser sent Accept-Language 'es-MX,es;q=0.9,en;q=0.4' — I have email templates in 'en', 'es', and 'pt-BR'. Which template should I send them, ranked by their preference?"}],"resultDescription":"Returns a JSON object containing a ranked array of language offer objects each with the offer string and its computed quality score (0–1), plus a 'selected' field naming the top-ranked match. Also includes an evidence block confirming no data was retained, an input SHA-256 hash, zero external calls, and schema/status metadata.","failureModes":["Malformed Accept-Language header string may produce unexpected quality scores or empty ranking","Empty offers array returns an empty ranked list with no selection","Offers array exceeding 256 items is rejected","Header string exceeding 8192 characters is rejected","Invalid locale codes in offers may be passed through unvalidated and ranked by textual match only"],"whenToPreferThis":"Choose this endpoint when you need fast, verifiable, privacy-safe Accept-Language parsing and locale negotiation without building your own parser. It is ideal for agents serving multilingual content who receive raw HTTP headers and need to deterministically pick a locale from a supported set. Prefer it over custom parsing when you want an auditable evidence trail (SHA-256 input hash, no retention guarantee) and pay-per-call USDC pricing with no subscription or API key signup.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-01T00:53:40.329Z","isFirstParty":false,"canonicalSlug":"delx-commerce-accept-language-rank-f48f0c99"}