Skip to main content

Documentation Index

Fetch the complete documentation index at: https://agentcash.dev/docs/llms.txt

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

fetch

npx agentcash fetch <url> [options]
Sends an HTTP request with automatic SIWX authentication and payment handling. If the endpoint returns 402, AgentCash attempts SIWX first and only pays if the route still requires it. Equivalent to the MCP fetch tool.
Run check <url> first to confirm the request body schema. Skipping this often causes 400 errors from wrong field names.

Options

FlagDescription
-m / --method <method>HTTP method (default: GET)
-b / --body <string>Raw request body string, passed through as-is
-H / --header <name:value>HTTP header in Name: value format (repeatable)
--timeout <ms>Request timeout in milliseconds
--payment-protocol <protocol>Force a specific payment protocol: x402 or mpp
--payment-network <network>Preferred network for SIWX and payment when applicable
--max-amount <usd>Abort if the payment challenge exceeds this amount

Example

npx agentcash fetch https://stableenrich.dev/api/apollo/people-enrich \
  -m POST \
  -b '{"email":"user@example.com"}'

fetch-auth

npx agentcash fetch-auth <url> [options]
Deprecated alias for fetch. It uses the same unified flow and accepts the same options, but new integrations should call fetch directly.

check

npx agentcash check <url> [options]
Gets the input/output schema and auth mode (paid or SIWX) for an endpoint. Returns exact field names from the OpenAPI spec. Equivalent to the MCP check_endpoint_schema tool. Call this before fetch to avoid 400 errors from wrong field names.

Options

FlagDescription
-H / --header <name:value>HTTP header in Name: value format (repeatable)
-b / --body <json>Probe the endpoint live for an exact price quote (useful when pricing is range-based)

Example

npx agentcash check https://stableenrich.dev/api/apollo/people-enrich

discover

npx agentcash discover <url> [options]
Lists available endpoints at an API origin with descriptions and auth modes (paid or SIWX). Works with any origin, not just registered ones. Equivalent to the MCP discover_api_endpoints tool.

Options

FlagDescription
--include-guidanceReturn full provider documentation (useful when composing multiple endpoints or when usage is unclear)

Example

npx agentcash discover https://stableenrich.dev
npx agentcash search "<query>"
Finds paid API services by natural-language query. Returns matching origins with endpoints and pricing. Use this to find an API before you know which origin to call. Equivalent to the MCP search tool.

Example

npx agentcash search "send a physical postcard"

try

npx agentcash try <url>
Fetches a new origin’s resources and returns a prompt guiding you through calling the first endpoint. Good for exploring an unfamiliar origin.

register

npx agentcash register <url>
Registers an origin with AgentCash by discovering and indexing its endpoints.

Example

npx agentcash register https://stableenrich.dev