Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.hyreagent.fun/llms.txt

Use this file to discover all available pages before exploring further.

x402 Protocol

HYRE uses the x402 protocol for payment — an extension of HTTP that turns the 402 Payment Required status code into a machine-readable payment flow. Agents pay per request with no API keys, no OAuth, and no subscriptions.

How x402 Works

1

Agent sends request without payment

curl https://mpp.hyreagent.fun/defi/tvl
The server returns HTTP 402 with payment requirements in the response body.
2

Server returns 402 with payment details

{
  "x402Version": 1,
  "accepts": [
    {
      "scheme": "exact",
      "network": "solana",
      "maxAmountRequired": "1000",
      "resource": "https://mpp.hyreagent.fun/defi/tvl",
      "payTo": "7G73PLhKvAPBGTzG5ESAE4coE7QrVeTTKfhTxQZbyGgC",
      "asset": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
      "description": "Total Value Locked across chains",
      "maxTimeoutSeconds": 300
    }
  ]
}
3

Agent signs payment and retries

The agent constructs a payment payload, signs it with its wallet, base64-encodes it, and attaches it as the X-PAYMENT header.
curl -X POST https://mpp.hyreagent.fun/defi/tvl \
  -H "X-PAYMENT: eyJ4NDAyVmVyc2lvbiI6MSwi..." \
  -H "Content-Type: application/json" \
  -d '{"chain": "solana"}'
4

Facilitator verifies and settles

The HYRE server forwards the payment to a facilitator that verifies the signature and settles the USDC transfer on-chain. If valid, the server processes the request and returns data.

Facilitators

HYRE uses two facilitators depending on the payment chain:
ChainFacilitatorURLGas
SolanaDexterhttps://x402.dexter.cashSponsored by HYRE
BasePayAIhttps://facilitator.payai.networkCaller pays (~$0.01)
SKALEPayAIhttps://facilitator.payai.networkFree (sFUEL)
The facilitator acts as a neutral third party:
  1. Verify — Checks the payment signature is valid and the amount is sufficient.
  2. Settle — Executes the USDC transfer on-chain after the server delivers data.

Payment Header Format

The X-PAYMENT header contains a base64-encoded JSON object:
{
  "x402Version": 1,
  "scheme": "exact",
  "network": "solana",
  "payload": {
    "signature": "<base58-encoded-solana-signature>",
    "transaction": "<base64-encoded-transaction>"
  }
}
For EVM chains (Base, SKALE), the payload contains an EIP-712 signed authorization instead of a Solana transaction.

Discovery

Agents can discover HYRE’s payment requirements programmatically:
curl https://mpp.hyreagent.fun/openapi.json | jq '.info["x-payment-protocols"]'

Pay-To Addresses

ChainAddress
Solana7G73PLhKvAPBGTzG5ESAE4coE7QrVeTTKfhTxQZbyGgC
Base (EVM)0xb5998e11E666Fd1e7f3B8e8d9122A755eec1E9b7
SKALE (EVM)0xb5998e11E666Fd1e7f3B8e8d9122A755eec1E9b7
Root paths (/) only accept Solana payments. Use /base/* for Base and /skale/* for SKALE. Sending an EVM payment to a root path returns a 402 redirect hint.