{"uid":"cap_Cb5iC2CeMi8TpkZJoTUnl","slug":"accept-header-rank-040d4ae2","name":"Accept Header Rank","description":"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…","url":"https://api.delx.ai/api/v1/x402/accept-header-rank","method":"POST","headers":{},"bodySchema":{"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."}}},"responseSchema":{"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"}},"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_mJnd3bOU1pav5RXlyJc42","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 offered media types against weighted HTTP Accept header ranges to determine the best match for content negotiation","exampleAgentPrompt":"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.","exampleUseCases":[{"title":"API gateway response format selection","prompt":"I have an incoming request with Accept header 'application/json;q=1.0, text/xml;q=0.8, text/plain;q=0.5' and my server can offer ['application/json', 'text/plain']. Which media type should I send back, and is it a clean match?"},{"title":"Cache key validation before storing response","prompt":"Before I cache this response, can you rank my offered types ['image/webp', 'image/png', 'image/jpeg'] against the caller's Accept header 'image/webp;q=0.9, image/*;q=0.7' so I know which variant to store under which cache key?"},{"title":"Redirect target content type check","prompt":"I'm about to redirect a client whose Accept header is 'text/html;q=1.0, application/xhtml+xml;q=0.9' — my available formats are ['application/xhtml+xml', 'application/json', 'text/html']. Tell me the ranked winner and whether the match is advisory or a solid pass."}],"resultDescription":"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.","failureModes":["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"],"whenToPreferThis":"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.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-15T07:14:50.438Z","isFirstParty":false}