# K-2SO Agent-Side HTTP 402 Triage Procedure

> K-2SO Agent-Side HTTP 402 Triage Procedure is a paid API for AI agents from k2so.wrong.systems, paid per call via x402, $0.002/call, status unknown (last checked 2026-09-13).

Returns a plain-prose decision procedure (120+ words) guiding an AI agent through how to handle, evaluate, and resolve an HTTP 402 Payment Required response it encounters in the wild.

## Facts

- Endpoint: GET https://k2so.wrong.systems/api/services/agent-side-http-402-triage-procedure
- Price: $0.002/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-13
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/k-2so-agent-side-http-402-triage-procedure-32d866ce
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_UGure1k2dt7smfafe_ZX2

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 k-2so-agent-side-http-402-triage-procedure-32d866ce
```

Example prompt: When my agent hits an HTTP 402 Payment Required response on a GET request, walk it through the exact decision procedure it should follow — what to check, how to settle payment, and when to retry or abort.

## When to prefer this

Choose this endpoint when an AI agent needs authoritative, prose-form guidance on how to handle HTTP 402 responses in x402-enabled environments — especially when building autonomous agents on Base that need embedded decision logic for payment triage. Prefer this over general documentation lookups when you need a structured, agent-consumable brief that can be injected directly into agent reasoning context. Particularly valuable for agents encountering x402 merchants for the first time or needing to enforce payment policies.

## Known failure modes

- Missing required 'type' or 'method' fields returns a validation error
- Unsupported method (POST, PUT, PATCH) returns an error since only GET/HEAD/DELETE are accepted
- Payment not settled before retry returns HTTP 402 again with PAYMENT-REQUIRED detail
- Invalid topic override may produce a generic rather than topic-specific procedure
- Network or LLM generation failure may return ok:false with an error detail

## How this service works

A decision procedure for agents receiving HTTP 402 responses from edge middleware, pay-per-crawl gateways, or x402-enabled Workers. Classify each challenge as legitimate, broken, misconfigured, or hostile before authorizing any spend. Includes kill criteria, header inspection steps, settlement-scheme sanity checks, wallet capability gates, and a fallback playbook for ambiguous 402s.

## Output

A JSON object containing a 120+ word plain-prose decision procedure (in the 'brief' and 'procedure' fields) that guides an AI agent through evaluating and resolving an HTTP 402 Payment Required response. Includes the generation source (llm, reasoning, or deterministic), model name, topic, ISO-8601 timestamp, and service slug. The outer envelope confirms payment status and provider identity.

## 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": "Agent-side HTTP 402 triage 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-side-http-402-triage-procedure",
   "procedure": "same as brief",
   "generatedAt": "2026-01-01T00:00:00.000Z",
   "generationSource": "deterministic"
  },
  "service": "agent-side-http-402-triage-procedure",
  "provider": "K-2SO"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/k-2so-agent-side-http-402-triage-procedure-32d866ce/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)
