/healthCheck whether the bitcoinagent API is reachable.
npx agentsats health --jsonUse AgentSats to discover bitcoinagent services, call GET and POST endpoints, return deterministic JSON, and handle x402 STX payment challenges from scripts or agent runtimes.
npx agentsats --help
npx agentsats services --json
npx agentsats service-endpoints --service twitter --json
npx agentsats twitter-tweets --user-id 2455740283 --count 20 --jsonapi-call for the expanded API surface.AgentSats is published as agentsats. Run it with npx, install it globally, or invoke it as a subprocess in your agent runtime.
npx agentsats --help
npx agentsats services --json
npx agentsats wallet --jsonBITCOINAGENT_API_URL when set, otherwise https://agentsats.stacksx402.com/. Every API command can override this with --api-url <url>.--plain for key-value text without decoration.--json. JSON mode wins over plain mode and is the automation contract.--json --help returns a structured VALIDATION_ERROR. Help without --json exits with code 0.
Discovery commands expose the available services and their endpoint metadata. Use these before selecting paid data routes.
/healthCheck whether the bitcoinagent API is reachable.
npx agentsats health --json/api/v1/servicesList available service groups and whether paid endpoints are enabled.
npx agentsats services --json/api/v1/services/:service/endpointsDiscover endpoint paths, required query parameters, and payment metadata for a service.
npx agentsats service-endpoints --service twitter --jsonserviceNamed commands are convenience wrappers for common TikTok and Twitter/X routes. They all support --api-url, --plain, and --json.
tiktok-profiletiktok-videostwitter-profiletwitter-highlightstwitter-tweetstwitter-followingsUse service-scoped commands when the endpoint belongs to a known service. Use api-call for full-path GET and POST requests.
npx agentsats airbnb \
--endpoint stays/search \
--query placeId=ChIJVTPokywQkFQRmtVEaUZlJRA \
--jsonnpx agentsats api-call \
--method POST \
--path /api/v1/google-flights/booking/url \
--body-json '{"token":"booking-token"}' \
--json. or .. segments before any request is made. Put query values in repeated --query key=value flags, not inside --endpoint.Wallets are optional for free endpoints and required for automatic x402 payment signing. AgentSats supports private-key wallets and Open Wallet Standard preview wallets.
AGENTSATS_WALLET_PROVIDER=private-key
STACKS_NETWORK=mainnet
STACKS_PRIVATE_KEY=your-stacks-private-keyAGENTSATS_WALLET_PROVIDER=ows
OWS_WALLET=agentsats-mainnet
OWS_CHAIN=stacks:1
OWS_CLI=/path/to/ows
OWS_STACKS_KEY_ENCODING=uncompressed
OWS_PASSPHRASE=npx agentsats wallet setup \
--provider ows \
--preview-stacks \
--wallet agentsats-mainnet \
--network mainnet \
--jsonStacks support in OWS is still under development.
payment-required header.payment-signature. If settlement is pending, it retries once more with the same signature.{
"success": false,
"error": {
"code": "PAYMENT_REQUIRED",
"message": "Payment is required for this endpoint.",
"details": {
"statusCode": 402,
"endpoint": "/api/v1/twitter/profile",
"paymentRequired": {
"accepts": [
{
"scheme": "exact",
"network": "stacks:1",
"asset": "STX",
"amount": "1000"
}
]
}
}
},
"meta": {
"timestamp": "2026-04-16T00:00:00.000Z",
"mode": "json"
}
}JSON output is always a CliResponse<T>. Successful commands include data; failed commands include error. The meta object always includes timestamp and mode.
{
"success": true,
"data": {
"method": "GET",
"endpoint": "/api/v1/twitter/profile",
"statusCode": 200,
"provider": "rapidapi",
"response": {
"Username": "MrBeast",
"DisplayName": "MrBeast"
},
"timestamp": "2026-04-16T00:00:00.000Z"
},
"meta": {
"timestamp": "2026-04-16T00:00:00.000Z",
"mode": "json"
}
}VALIDATION_ERROR, NOT_FOUND, PAYMENT_REQUIRED, INTERNAL_ERROR.npx agentsats complete zsh > ~/.agentsats-completion.zsh
npx agentsats complete bash > ~/.agentsats-completion.bash