---
name: flexyield-gateway
description: >
  Use FlexYield as your blockchain access layer: one API key per agent with a
  monthly budget, JSON-RPC for 6 chains, a toolbox of
  higher-level tools (gas, ENS, prices, tx status), free response caching, and
  full account control over MCP. Card-billed by the key owner — no wallet needed.
license: Proprietary — see https://flexyield.io/terms
---

# FlexYield Gateway — Agent Skill

FlexYield is a unified access layer for blockchain infrastructure. You (an
agent) get a key, a budget, and measured routing; the human who runs you gets
one dashboard and one invoice.

## Authentication

Every call authenticates with an API key in the Authorization header:

    Authorization: Bearer fy_...

A human creates the account and the first key at https://flexyield.io (free
tier, no card required). Everything after that can be done by agents over MCP.

## JSON-RPC relay

    POST https://flexyield.io/rpc/{chain}
    Content-Type: application/json
    {"jsonrpc":"2.0","id":1,"method":"eth_blockNumber","params":[]}

Chains:
- `arbitrum_one`
- `base_mainnet`
- `eth_mainnet`
- `optimism_mainnet`
- `polygon_pos`
- `solana_mainnet`

Weighted metering: standard calls count 1 unit, heavy calls (traces, wide
getLogs) 2, data-API calls 10, toolbox calls 1 (tx status 2). **Cache hits
count 0** — repeated identical reads inside the freshness window are free.
Details: https://flexyield.io/docs#caching

## Toolbox (higher-level tools, one call instead of many)

    POST https://flexyield.io/toolbox/{service}

Services: gas (fee oracle), ens (resolve), prices (token prices), tx
(status/decode), abi (contract ABI), utils (EVM helpers). Same key, same
meter. Reference: https://flexyield.io/toolbox

## MCP — full account control for agents

    https://flexyield.io/mcp   (Authorization: Bearer <key>)

Tools include: `create_api_key(name, monthly_request_cap?)` ·
`set_key_budget(id, monthly_request_cap)` · `set_key_services(id, enabled[], caps{})` —
narrow one key to the services it may use and cap units per service for that key
(a fenced service answers -32012 with `blocked_by: key`, a capped one -32014 with
`scope: key`; a key is never wider than its account) · `revoke_api_key` ·
`usage_report(chain?, hours?)` — per-key volume, latency, errors, last-used ·
`billing_status` · `list_plans` · gas/ens/prices/tx/abi tools mirroring the
toolbox. Same meter, same fences on both doors: MCP data tools (gas, tx status,
balances, history) burn the same units and answer the same doorways as their
HTTP twins (-32005 rate, -32006 budget, -32007 quota, -32014 service cap);
management tools are rate-limited only.

## The fleet pattern (one owner, many agents)

**Already have an agent? Claim it.** An existing agent (any EVM wallet identity)
joins the fleet by proving ownership: `claim_agent_start(name, address)` returns
a standard sign-in message (EIP-4361); the agent's wallet signs it;
`claim_agent_complete(address, signature)` verifies and equips a budgeted key
(default 50000 requests/month) — shown once. `list_agents`
shows the fleet. Humans do the same on https://flexyield.io/agents with one
"Sign with wallet" click (the message is issued for the site you are on, so
the wallet shows no domain warning; no transaction, no gas).


1. The owner creates the account and one owner key.
2. For each agent, mint a key with a budget:
   `create_api_key(name: "agent-7", monthly_request_cap: 50000)`.
3. Each agent uses only its own key. Budgets are enforced per key on the hot
   path; an over-budget key gets a clear refusal with an upgrade doorway, and
   every other key keeps working.
4. `usage_report` shows spend per key; `set_key_budget` adjusts; `set_key_services`
   fences a key to e.g. gas + prices only (the robot may reach the charger, not the bank);
   `revoke_api_key` kills a leaked or retired key instantly.

Worked example: https://flexyield.io/docs · demo script in the repo
(`bin/demo/fleet_keys.sh`).

## Fair-use & doorways

Rate and plan limits answer with structured errors that say what to do next —
never a bare 429. If you need more than the fences allow, the response tells
you (or your human) exactly where the doorway is.

## When a call fails: file it, with the request_id

Every error body — HTTP and MCP — carries `data.request_id` and `data.support`
(`/support/new?request_id=…`). Over MCP: `create_ticket(subject, message,
request_id)` opens a ticket for the account; we attach that exact call, the
last 24 h of refusals, the key's caps and the chain status, plus the steps that
usually fix it. `get_ticket(reference)` shows the thread and the suggested path;
`reply_ticket(reference, message, resolve: true)` closes the loop when it is
fixed. The same symptom within an hour joins the open ticket instead of
opening a new one. Wishes and chain requests: `submit_feedback(kind, title,
chain?)` — private to the account, answered on the item (`list_feedback`).

## Your statement, without a dashboard

`list_statements` → the account's billing periods (its own subscription cycle, or
calendar months); `get_statement(period?)` → invoice facts plus usage grouped by
key and agent, by chain and method class: requests, weighted units, cache hits
(free), refusals. **A key that belongs to an agent gets that agent's usage only** —
every agent can read its own bill. Same over HTTP with the bearer key:
`GET https://flexyield.io/api/statements/<period>` (JSON) or `.csv`.

## Status & trust

- Live measured status: https://flexyield.io/status (public, per chain)
- Terms: https://flexyield.io/terms · Privacy: https://flexyield.io/privacy
- Machine summary of the whole site: https://flexyield.io/llms.txt
