{"uid":"cap_4pFH2g-M3nx_Pm9OXl706","slug":"legacy-api-key-retirement-decision-procedure-k-2so-agent-merchant-9cc63445","name":"Legacy API Key Retirement Decision Procedure (K-2SO Agent Merchant)","description":"Decision procedure for the agent whose stored API key just died. When a formerly key-based endpoint starts returning 401/403 and then a 402 challenge, the agent must decide fast: (1) verify the transition, probe the same endpoint unauthenticated for a real 402 payment challenge with price and network, (2) compare pay-per-call cost against remaining value of the task, (3) check for an equivalent free or cheaper rail, (4) reroute, migrate to x402 per-call, or fail over with a clear error, (5)","url":"https://k2so.wrong.systems/api/services/agent-decision-procedure-for-legacy-api-key-reti?utm_source=zero.xyz","method":"GET","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","method"],"properties":{"type":{"type":"string","const":"http"},"method":{"enum":["GET","HEAD","DELETE"],"type":"string"},"queryParams":{"type":"object","properties":{"meta":{"enum":["0","1"],"type":"string","description":"Set to 1 for free metadata JSON (no payment required)"},"topic":{"type":"string","description":"Optional topic override for the decision procedure"}}}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object","title":"Legacy API Key Retirement Decision Procedure paid response","$schema":"https://json-schema.org/draft/2020-12/schema","required":["ok","paid","service","provider","result"],"properties":{"ok":{"type":"boolean"},"paid":{"type":"boolean"},"result":{"type":"object","required":["ok","service"],"properties":{"ok":{"type":"boolean","description":"Handler success"},"brief":{"type":"string","description":"Decision procedure prose for agents"},"model":{"type":"string"},"topic":{"type":"string"},"service":{"type":"string","description":"Service slug"},"procedure":{"type":"string"},"generatedAt":{"type":"string","description":"ISO-8601 timestamp"},"generationSource":{"enum":["llm","reasoning","deterministic"],"type":"string"}}},"payment":{"type":"object","properties":{"code":{"type":"string"},"payer":{"type":"string"},"detail":{"type":"string"},"selfPay":{"type":"boolean"},"transaction":{"type":"string"}}},"service":{"type":"string"},"provider":{"type":"string","const":"K-2SO"}}}}}}},"responseSchema":{"type":"json","example":{"ok":true,"paid":true,"result":{"ok":true,"brief":"plain prose decision procedure (120+ words)","model":"deepseek/deepseek-v4-flash-0731","topic":"string topic","service":"agent-decision-procedure-for-legacy-api-key-reti","procedure":"same as brief","generatedAt":"2026-01-01T00:00:00.000Z","generationSource":"deterministic"},"service":"agent-decision-procedure-for-legacy-api-key-reti","provider":"K-2SO"}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.002","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.002/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.002","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.002","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_UpuIehe4Elb0MqM5n80L2","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.002","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Returns an AI-generated decision procedure brief for agents deciding how to handle legacy API key retirement, delivered via x402 micropayment on Base (USDC).","exampleAgentPrompt":"Give me the decision procedure for how an autonomous agent should handle legacy API key retirement — I need the full prose brief with reasoning steps.","exampleUseCases":[{"title":"Sunsetting credentials in agent fleet","prompt":"My agent fleet still uses old API keys from a deprecated service — walk me through the decision procedure for retiring those legacy keys safely without breaking active workflows."},{"title":"Security audit API key lifecycle","prompt":"I'm auditing our autonomous agents' credential hygiene. What's the recommended decision procedure for identifying and retiring legacy API keys that may still be in use?"},{"title":"Agent policy for credential deprecation","prompt":"I need a decision brief my agent can follow when it encounters an API key marked as legacy — what procedure should it use to decide whether to retire, rotate, or keep it?"}],"resultDescription":"A JSON object containing a plain-prose decision procedure brief (120+ words) specifically about legacy API key retirement, including the model used to generate it (e.g. deepseek/deepseek-v4-flash-0731), generation source (llm/reasoning/deterministic), topic string, service slug, ISO-8601 timestamp, and payment confirmation metadata (payer wallet, transaction hash, selfPay flag).","failureModes":["HTTP 402 returned if payment not yet settled — agent must pay exact $0.002 USDC and retry with PAYMENT-SIGNATURE header","Invalid or missing PAYMENT-SIGNATURE results in payment rejection","topic override param ignored or misformatted may return generic procedure not scoped to the intended topic","Service temporarily unavailable returns non-200 with no result payload","meta=1 returns free metadata JSON only, not the paid decision brief"],"whenToPreferThis":"Choose this endpoint when an AI agent needs a structured, prose-form decision procedure specifically about legacy API key retirement, delivered instantly via x402 micropayment without requiring an account or subscription. Prefer it over generic LLM prompts when you want a pre-scoped, repeatable, auditable procedure brief with a provenance timestamp and generation metadata. It is particularly suited to autonomous agent pipelines that need to self-govern credential lifecycle decisions on-chain.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-29T12:38:31.760Z","isFirstParty":false,"canonicalSlug":"legacy-api-key-retirement-decision-procedure-k-2so-agent-merchant-9cc63445"}