The agent obtains a specific result from a deterministic service by paying a small fee per call, handling potential refusals or rate limits.
The agent identifies a suitable service from the catalog (e.g., 'mojibake-repair') and retrieves its input schema via the example endpoint. It constructs the JSON input and sends a POST request to the run endpoint. If a 402 response is received, the agent signs the payment with its x402 wallet and resends the request. The agent must handle errors like refusals ('CANNOT...') or rate limits by checking the response headers and body, ensuring it does not retry refused inputs.
- Category: Data and analysis
- Effect: Moves money or places orders
- MCP servers: AISkills402 MCP (https://koskamo.com/explore/aiskills402-mcp)
- Source: Connect your agent — AISkills402 (https://aiskills402.com/docs)
- Source quote: "POST the JSON input to https://api.aiskills402.com /v1/run/<slug> with no payment header. The answer is 402 with a PAYMENT-REQUIRED header. Sign accepts[0] (scheme exact , USDC, Base) with an x402 client."
- Playbook page: https://koskamo.com/explore/use-cases/execute-pay-per-call-deterministic-services
Prompt: Use the aiskills402 service to repair mojibake in the text 'Hello Wörld'. Check the example input schema first, then execute the service with payment.