Skip to main content
POST
/
proxy
Execute x402 payment-gated API call
curl --request POST \
  --url https://api.httpayer.com/proxy \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '
{
  "api_url": "https://www.x402.org/protected",
  "method": "GET",
  "json": {
    "city": "San Francisco"
  },
  "data": {},
  "body": "<string>",
  "payload": {},
  "params": {
    "limit": "10",
    "offset": "0"
  },
  "headers": {
    "Accept": "application/json"
  },
  "auth": {
    "username": "<string>",
    "password": "<string>"
  },
  "cookies": {
    "session": "abc123"
  },
  "timeout": 30
}
'
{}

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.

Authorizations

x-api-key
string
header
required

API key for authentication

Headers

X-TIMEOUT
number

Client timeout in milliseconds (max 120000ms / 2 minutes)

Body

application/json
api_url
string
required

Target API URL to call via proxy

Example:

"https://www.x402.org/protected"

method
enum<string>
required

HTTP method for target API

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

"GET"

json
object

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

Example:
{ "city": "San Francisco" }
data

Form-encoded body when an object, raw string body when a string. Mirrors Python requests(data=...). Object → Content-Type: application/x-www-form-urlencoded. String → passed through as-is; set Content-Type via headers.

body
string

Pre-serialized body string — passed through unchanged, without setting Content-Type. If you pass an object it will be JSON-stringified, but you must manually set Content-Type: application/json via headers. 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

Example:
{ "limit": "10", "offset": "0" }
headers
object

Custom headers forwarded to the target API

Example:
{ "Accept": "application/json" }
auth
object

Basic auth shorthand — converted to Authorization: Basic . Mirrors Python requests(auth=("user", "pass")).

cookies
object

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

Example:
{ "session": "abc123" }
timeout
number

Per-request timeout in seconds (server default applies if omitted; also accepts X-TIMEOUT header in ms)

Example:

30

Response

Target API request successful

Response from target API (pass-through)