# x402 Crediting Swarm

> x402 Crediting Swarm is a paid API for AI agents from x402-crediting-swarm-production.up.railway.app, paid per call via x402, $0.05/call, status unknown (last checked 2026-09-15).

Runs a 3-node AI swarm to score an x402 Payment Required endpoint and return a GO/NO-GO credit recommendation with a creditability score.

## Facts

- Endpoint: POST https://x402-crediting-swarm-production.up.railway.app/api/swarm
- Price: $0.05/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/x402-crediting-swarm-86bed00b
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_tvqXR55e3dSKZcIplnLAx

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 x402-crediting-swarm-86bed00b -d '<json body>'
```

Example prompt: Before my agent pays the x402 endpoint at https://api.example.com/data, run it through the crediting swarm to score its creditability and tell me if I should GO ahead or NO-GO.

## When to prefer this

Choose this endpoint when an AI agent or automated workflow needs to evaluate whether an x402 Payment Required endpoint is trustworthy before committing a micropayment. It is especially useful in agentic pipelines where the agent must autonomously decide whether to pay unknown or third-party x402 APIs. Prefer this over manual inspection when you need a structured, scored, multi-node consensus recommendation rather than a simple URL check.

## Known failure modes

- Missing required endpoint_url field returns a validation error
- Unreachable or non-existent endpoint_url may result in low score or error status
- Invalid method enum value (not POST/PUT/PATCH) causes schema rejection
- Malformed payload body causes parsing failure
- Transient upstream swarm node failures may return partial or degraded results

## How this service works

3-node swarm that scores x402 Payment Required calls and returns a GO/NO-GO credit recommendation.

## Output

Returns a JSON object containing a status string, a final_creditability_score integer (e.g. 820), a final_recommendation of GO or NO-GO, an optional trust_level label, an array of node_reports from each of the 3 swarm nodes, and an array of aggregated_flags describing any detected risk signals.

## 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",
    "bodyType",
    "body"
   ],
   "properties": {
    "body": {
     "type": "object",
     "required": [
      "payload"
     ],
     "properties": {
      "payload": {
       "type": "object",
       "required": [
        "endpoint_url"
       ],
       "properties": {
        "payTo": {
         "type": "string"
        },
        "vendor_id": {
         "type": "string"
        },
        "endpoint_url": {
         "type": "string"
        }
       }
      },
      "caller_id": {
       "type": "string"
      }
     }
    },
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "POST",
      "PUT",
      "PATCH"
     ],
     "type": "string"
    },
    "bodyType": {
     "enum": [
      "json",
      "form-data",
      "text"
     ],
     "type": "string"
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "required": [
      "status",
      "final_creditability_score",
      "final_recommendation"
     ],
     "properties": {
      "status": {
       "type": "string"
      },
      "trust_level": {
       "type": "string"
      },
      "node_reports": {
       "type": "array"
      },
      "aggregated_flags": {
       "type": "array",
       "items": {
        "type": "string"
       }
      },
      "final_recommendation": {
       "type": "string"
      },
      "final_creditability_score": {
       "type": "integer"
      }
     }
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "status": "success",
  "final_recommendation": "GO",
  "final_creditability_score": 820
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/x402-crediting-swarm-86bed00b/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402-crediting-swarm-production.up.railway.app](https://www.zero.xyz/host/x402-crediting-swarm-production.up.railway.app/llms.txt)
