---
title: "JSON-RPC relay with multi-provider failover"
method: POST
path: "/rpc/{chain}"
---

# JSON-RPC relay with multi-provider failover

`POST /rpc/{chain}`

## Request

- Base URL: `https://flexyield.io`
- URL: `https://flexyield.io/rpc/{chain}`
- Auth: one of:
  - HTTP bearer
  - API key in header `X-PAYMENT`

## Path parameters

- `chain` 'eth_mainnet' | 'base_mainnet' | 'arbitrum_one' | 'optimism_mainnet' | 'polygon_pos' | 'solana_mainnet', required

## Request body

- JsonRpcRequest
  - `jsonrpc` '2.0', required
  - `id` unknown
  - `method` string, required
  - `params` unknown[]
    - unknown

## Response `200`

The upstream's JSON-RPC response (also for in-band JSON-RPC errors)

- JsonRpcResponse
  - `jsonrpc` string
  - `id` unknown
  - `result` unknown
  - `error` object

## Other responses

- `401`: Invalid or missing API key (-32001)
- `402`: x402 lane: the settlement is unknown, spent or expired — pay against the menu at /x402 and retry with X-PAYMENT
- `403`: Service switched off for this account/key (-32012) or account suspended (-32009)
- `404`: Unknown chain (-32600) or method not in the catalog (-32601, with the concierge doorway)
- `429`: Rate window, key budget, plan quota or service cap reached (-32005/-32006/-32007/-32014) — the body says what to do next

---

[API](https://skmtc.dev/flexyield/apis/flexyield-api.md) · [All operations](https://skmtc.dev/flexyield/apis/flexyield-api/llms.txt) · [OpenAPI document](https://skmtc.dev/flexyield/apis/flexyield-api/revisions/bad139887e25?raw)
