x402station.io API reference

Routing alternatives for a blocked endpoint

Return healthy sibling endpoints when Preflight blocks the original URL.

This HTML page is served by GET /api/v1/alternatives. The paid API operation remains POST /api/v1/alternatives.

Signature
POST /api/v1/alternatives
Pricing
$0.005 USDC
Settlement
x402 v2 · exact · Base mainnet USDC
Canonical
https://x402station.io/api/v1/alternatives

x402 challenge example

HTTP/1.1 402 Payment Required
payment-required: <base64 PaymentRequiredResponse>
www-authenticate: x402
content-type: application/json; charset=utf-8

{
  "x402Version": 2,
  "error": "Payment required",
  "resource": {
    "url": "https://x402station.io/api/v1/alternatives",
    "description": "Routing alternatives for a blocked endpoint"
  },
  "accepts": [
    {
      "scheme": "exact",
      "network": "eip155:8453",
      "asset": "USDC",
      "amount": "5000",
      "payTo": "0x4053338C7cB38624C0bc23c900F78Cf8470b4E38",
      "maxTimeoutSeconds": 300
    }
  ]
}

Request body

{
  "url": "https://api.example.com/x402-endpoint",
  "taskClass": "llm-completions",
  "limit": 3
}

Success response

{
  "alternatives": [
    {
      "url": "https://api.peer.example.com/x402-endpoint",
      "score": 0.91,
      "match_reason": "same_provider"
    }
  ]
}

Error codes

statusmeaning
400Malformed JSON body, invalid URL, or missing required field.
402Payment required. Decode payment-required, sign x402, retry.
503Query/probe pipeline timeout. Treat as failed preflight; do not pay target blindly.
404No healthy alternatives found for the URL/task class.

Notes

Machine-readable links