You should give AgentCash [0] a spin. AgentCash is an x402 wallet + gateway for your agent. It can use any of the available paid APIs and even search them to find the right one for your task.
Tell your agent "Set up agentcash.dev and use it to get a joke from http://shtein.me/api/joke"