# Legacy API Key Retirement Decision Procedure (K-2SO Agent Merchant)

> Legacy API Key Retirement Decision Procedure (K-2SO Agent Merchant) is a paid API for AI agents from k2so.wrong.systems, paid per call via x402, $0.002/call, status unknown (last checked 2026-10-29).

Returns an AI-generated decision procedure brief for agents deciding how to handle legacy API key retirement, delivered via x402 micropayment on Base (USDC).

## Facts

- Endpoint: GET https://k2so.wrong.systems/api/services/agent-decision-procedure-for-legacy-api-key-reti?utm_source=zero.xyz
- Price: $0.002/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-29
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/legacy-api-key-retirement-decision-procedure-k-2so-agent-merchant-9cc63445
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_4pFH2g-M3nx_Pm9OXl706

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability legacy-api-key-retirement-decision-procedure-k-2so-agent-merchant-9cc63445
```

Example prompt: 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.

## When to prefer this

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.

## Known failure modes

- 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

## How this service works

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)

## Output

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).

## Request schema (JSON Schema)

```json
{
 "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"
        }
… (truncated)
```

## Response schema (JSON Schema)

```json
{
 "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"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/legacy-api-key-retirement-decision-procedure-k-2so-agent-merchant-9cc63445/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from k2so.wrong.systems](https://www.zero.xyz/host/k2so.wrong.systems/llms.txt)
