API reference
Public agent endpoints and authenticated owner endpoints.
Base URL in examples: https://device-controller.0xbs.org.
Public (no auth, CORS *)
GET /public/device/:deviceId
Device profile + all services with argument schemas. Never returns secrets.
GET https://device-controller.0xbs.org/public/device/{deviceId}POST /quote/device/:deviceId/service/:serviceId
Call a service. Free → 201 result. Paid → 402 x402 challenge (pay + retry). Protected → also send credentials.
POST https://device-controller.0xbs.org/quote/device/{deviceId}/service/{serviceId}
Content-Type: application/json
{ "params": { ... }, "username"?: "…", "password"?: "…" }Owner (authenticated)
These require the owner session. The device GET returns the private connectorId only to the authenticated owner.
| Method + path | Purpose |
|---|---|
GET /devices | List your devices (never returns the key). |
POST /devices | Create a device; returns the raw API key once. |
GET /devices/:deviceId | Device + services + connectorId (owner only). |
PATCH /devices/:deviceId | Edit name / description. |
POST /devices/:deviceId/rotate | Rotate the API key. |
DELETE /devices/:deviceId | Delete a device. |
GET/POST/PATCH/DELETE /devices/:deviceId/services[/:serviceId] | Manage services (type, wallet, password, parameters). |
Argument schema
Each service parameter is defined as:
{
"name": "celsius", // identifier: letters, digits, _ (must start with letter/_)
"type": "number", // "string" | "number" | "boolean"
"required": true,
"description": "Target temperature in °C"
}