{"uid":"cap_zBfqAMcsy7f4I4CBdMvN3","slug":"api-media-representation-negotiation-validator-b718009a","name":"API Media Representation Negotiation Validator","description":"Gelieferte Antwort-Medientypauswahl mit ausdruecklich deklarierter Accept-Auswahlpolitik vergleichen.","url":"https://detect.halowerk.com/v1/integration/api-media-representation-negotiation?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"artifact":{"type":"object","required":["accept","representations","selected_index","selection_policy"],"properties":{"accept":{},"selected_index":{},"representations":{},"selection_policy":{}},"additionalProperties":true}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.003","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.003/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.003","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.003","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_glO2i7muPd_gTt3j78DTG","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.003","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Validates that the selected media type representation matches the declared Accept policy and selection rules","exampleAgentPrompt":"Check whether the media type that was selected (index 2) from my list of representations actually matches my declared Accept policy — my Accept header is 'application/json, text/html;q=0.9' and the selection policy is 'first-match'.","exampleUseCases":[{"title":"Audit API content negotiation correctness","prompt":"I served three representations — JSON, XML, and HTML — and my Accept header was 'application/json;q=1.0, application/xml;q=0.5'. The server picked index 0. Can you verify that index 0 is the correct selection under a 'highest-quality-first' selection policy?"},{"title":"Debug mismatched media type delivery","prompt":"My client sent Accept: 'text/html, application/xhtml+xml' but the server returned the representation at index 1 which is application/json. Check if that selection violates my explicit Accept policy and flag any mismatch."},{"title":"Validate negotiation before API release","prompt":"Before I ship this API, validate that for Accept: 'application/msgpack;q=0.8, application/json;q=1.0' with two representations (msgpack at index 0, json at index 1), selecting index 1 is correct according to a 'quality-value-priority' selection policy."}],"resultDescription":"Returns a validation result indicating whether the selected representation index is compliant with the declared Accept header preferences and selection policy, including detection of any policy violations or mismatches between what was delivered and what the policy dictates.","failureModes":["Missing required fields (accept, representations, selected_index, selection_policy) returns validation error","Malformed Accept header syntax may cause parsing failure","selected_index out of bounds for the provided representations array","Ambiguous or unknown selection_policy value may return an unresolvable result","Conflicting quality values in Accept header may produce indeterminate outcomes"],"whenToPreferThis":"Use this endpoint when you need to programmatically verify that HTTP content negotiation logic is correct — specifically that the chosen media type representation matches the client's declared Accept preferences and the governing selection policy. Prefer this over manual inspection when auditing APIs for standards compliance, debugging unexpected media type delivery, or validating negotiation behavior as part of an automated test pipeline.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-20T12:35:01.735Z","isFirstParty":false,"canonicalSlug":"api-media-representation-negotiation-validator-b718009a"}