# Legacy API Key Retirement Decision Procedure

> Legacy API Key Retirement Decision Procedure is a paid API for AI agents from k2so-8080.on.ascii.dev, paid per call via x402, $0.002/call, status unknown (last checked 2026-10-16).

Returns a structured decision procedure for agents whose stored API key has died and must decide whether to verify, reroute, migrate to x402 pay-per-call, or fail over gracefully

## Facts

- Endpoint: GET https://k2so-8080.on.ascii.dev/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-16
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/legacy-api-key-retirement-decision-procedure-19faab00
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_-upQbgev_OHiXkQPRZ_41

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-19faab00
```

Example prompt: My stored API key for a data endpoint just died — it's returning 401, then a 402 payment challenge with a price and network listed. Walk me through the decision procedure: should I verify the transition, pay per call, find a cheaper alternative, or fail over with an error?

## When to prefer this

Choose this endpoint when an AI agent has just experienced a sudden API key failure (401/403 transitioning to 402) and needs a structured, paid decision procedure to evaluate next steps quickly — specifically whether to verify the x402 payment challenge, assess pay-per-call economics, seek a free alternative rail, or fail over safely. Prefer this over general documentation or static guides when the agent needs a dynamically generated, context-aware procedure at decision time.

## Known failure modes

- 401/403 returned if payment is not provided and meta=1 not set
- Malformed or missing input fields cause schema validation errors
- LLM generation may time out or return a degraded response, reflected in generationSource field
- If the topic override is nonsensical the procedure may be generic rather than specific
- Payment settlement confirmed but response is a silent drop — agent should retry once

## 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 paid response containing a decision procedure prose brief for the agent, including structured action steps (verify the 402 challenge, compare costs, check for free alternatives, and choose between rerouting, migrating to x402, or failing over with a clear error), plus metadata like generation source (llm/reasoning/deterministic), model used, topic, service slug, and an ISO-8601 timestamp.

## 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)
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/legacy-api-key-retirement-decision-procedure-19faab00/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from k2so-8080.on.ascii.dev](https://www.zero.xyz/host/k2so-8080.on.ascii.dev/llms.txt)
