x402
Alphakek API is also available via x402 - an open, neutral standard for internet-native payments.
Alphakek x402 Gateway provides the following endpoints:
https://api.alphakek.ai/x402/knowledge/ask - equivalent to Wizard API
import { Wallet } from "ethers";
import { wrapFetch } from "x402-fetch";
const PRIVATE_KEY = "faaa8824...c33816";
const wallet = new Wallet(PRIVATE_KEY);
const fetchX402 = wrapFetch(wallet);
const response = await fetchX402(
"https://api.alphakek.ai/x402/knowledge/ask",
{
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({
question: "how to start a fake somali daycare..."
})
}
);
const data = await response.json();
console.log(`Status: ${response.status}`);
console.log(`Response:\n${data.answer}`);from eth_account import Account
from x402.clients.requests import x402_requests
PRIVATE_KEY = "faaa8824...c33816"
account = Account.from_key(PRIVATE_KEY)
session = x402_requests(account)
response = session.post(
"https://api.alphakek.ai/x402/knowledge/ask",
json={
"question": "how to start a fake somali daycare",
}
)The response format is equivalent to POST /knowledge/ask.
Further reading:
Last updated