Skip to main content
POST
/
relay
/
sim
Simulate relay payment
curl --request POST \
  --url https://api.httpayer.com/relay/sim \
  --header 'Content-Type: application/json' \
  --data '
{
  "api_url": "https://demo.httpayer.com/base-weather",
  "method": "GET",
  "json": {},
  "data": {},
  "body": "<string>",
  "payload": {},
  "params": {},
  "headers": {
    "X-API-KEY": "your-target-api-key",
    "Authorization": "Bearer token123"
  },
  "auth": {
    "username": "<string>",
    "password": "<string>"
  },
  "cookies": {
    "session": "abc123"
  },
  "network": "base"
}
'
{
  "requiresPayment": true,
  "targetPaymentRequirements": {
    "scheme": "exact",
    "network": "base",
    "payTo": "<string>",
    "asset": "<string>",
    "maxAmountRequired": "<string>",
    "resource": "<string>",
    "description": "<string>",
    "mimeType": "application/json",
    "maxTimeoutSeconds": 180
  },
  "relayFeeBreakdown": {
    "targetAmount": 0.01,
    "relayFee": 0.0003,
    "totalAmount": 0.0103,
    "relayFeePercentage": 3,
    "relayFeeMinUSDC": 0.002,
    "feeModel": "3% with $0.002 minimum"
  },
  "message": "<string>"
}

Documentation Index

Fetch the complete documentation index at: https://docs.httpayer.com/llms.txt

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

Body

application/json
api_url
string
required

The target API URL to call via the relay

Example:

"https://demo.httpayer.com/base-weather"

method
enum<string>
required

HTTP method for the target API

Available options:
GET,
POST,
PUT,
DELETE,
PATCH
Example:

"GET"

json
object

JSON body — serialized with Content-Type: application/json. Mirrors Python requests(json=...).

data

Form-encoded body (object) or raw string body (string). Mirrors Python requests(data=...).

body
string

Pre-serialized body string passed through unchanged — Content-Type is NOT set automatically. If you pass an object it will be JSON-stringified, but you must set Content-Type: application/json via headers yourself. Use json instead for automatic Content-Type handling.

payload
object

Deprecated alias for json. Use json instead.

params
object

Query parameters appended to the target URL

headers
object

Custom headers forwarded to the target API

Example:
{
"X-API-KEY": "your-target-api-key",
"Authorization": "Bearer token123"
}
auth
object

Basic auth shorthand — converted to Authorization: Basic . Mirrors Python requests(auth=(...)).

cookies
object

Cookie shorthand — merged into the Cookie header. Mirrors Python requests(cookies={...}).

Example:
{ "session": "abc123" }
network
enum<string>

Blockchain network to use for payment

Available options:
base,
base-sepolia,
skale-base,
skale-base-sepolia,
solana,
solana-mainnet-beta,
solana-devnet
Example:

"base"

Response

Simulation completed successfully

requiresPayment
boolean

Whether the target API requires payment

targetPaymentRequirements
object
relayFeeBreakdown
object
message
string