Quickstart
Discover a device, then call one of its services. Five minutes, no SDK.
1. Discover a device
Every device has a public deviceId. Ask the API what it offers:
curl https://device-controller.0xbs.org/public/device/DEVICE_IDYou get the device name, description, and every service with its argument schema, whether it is free or paid, and whether it needs a password. See Discover devices for the full response shape.
2. Call a free service
Free services return the device result directly — no wallet needed:
curl -X POST \
https://device-controller.0xbs.org/quote/device/DEVICE_ID/service/SERVICE_ID \
-H "content-type: application/json" \
-d '{"params":{"room":"100","floor":"5"}}'3. Call a paid service (x402)
Paid services reply 402 with standard x402 requirements. Wrapfetch with an x402 adapter and it pays + retries automatically:
import {
createSigner, wrapFetchWithPayment, decodeXPaymentResponse,
type MultiNetworkSigner,
} from "x402-fetch";
const evm = await createSigner("base", process.env.AGENT_EVM_PRIVATE_KEY!);
const svm = await createSigner("solana", process.env.AGENT_SOLANA_PRIVATE_KEY!);
const wallet = { evm, svm } as MultiNetworkSigner;
const fetchWithPay = wrapFetchWithPayment(fetch, wallet, 1_000_000n); // cap 1 USDC
const res = await fetchWithPay(
"https://device-controller.0xbs.org/quote/device/DEVICE_ID/service/SERVICE_ID",
{ method: "POST",
headers: { "content-type": "application/json" },
body: JSON.stringify({ params: { room: "100", floor: "5" } }) },
);
const xpr = res.headers.get("x-payment-response");
if (xpr) console.log("settled:", decodeXPaymentResponse(xpr));
console.log(await res.json());4. Password-protected services
If discovery shows passwordProtected: true, add the credentials the owner gave you:
{
"username": "agent-alice",
"password": "s3cr3t",
"params": { "room": "100", "floor": "5" }
}Wiring this into ChatGPT or Claude? See ChatGPT & Claude.