- MCR API: reads, plus one signed write. , machine profiles, operator fleet data, metadata, and Machine Cards, all backed by contracts on peaq, plus the monetization opt-in toggle. Documented below.
- Machine Markets API: powers Scale. Machine identity proofs, machine records, , the skill registry, the service catalogue, and machine-aware market search. See the Machine Markets API overview.
Quick start
Pick the setup that matches your workflow: an AI-driven flow via the peaqOS skill, or direct HTTP calls.- Agent skill
- cURL
- ROS 2
/peaqos in Claude Code and ask for an MCR score, machine profile, or operator fleet — the skill picks the right CLI command and the CLI hits this API for you. To target a specific runtime, add --agent claude-code | cursor | windsurf — see the peaqOS AI page.Base URL
Set the environment variablePEAQOS_MCR_API_URL to the root of the MCR API server:
http://127.0.0.1:8000.
All endpoint paths in this reference are relative to that base URL.
Authentication
There are no API keys or tokens anywhere on this API. Every read is public: MCR scores, machine profiles, and metadata are public on-chain data. The single write, PUT /machine/{key}/monetization, authorizes the caller by verifying an signature carried in the request body. Still no key or token: the signature is the credential.Rate limits
The API enforces a limit of 90 requests per minute per IP address. Requests that exceed the limit receive a429 Too Many Requests response. For production deployments with multiple workers, the rate limiter backend can be swapped to Redis.
Server configuration
When self-hosting the MCR API, these environment variables tune caching, storage, the monetization write path, and test-mode behavior. Typical deployments need the contract addresses, RPC, and a persistent directory for the monetization state; the rest have workable defaults.Error envelope
Most error responses use the same JSON shape:detail string describes the cause. Common values:
Coded envelope on the monetization endpoints
The two monetization endpoints (GET, PUT) nest a stable machine-readable code instead of a bare string:code, never on message. One case returns neither shape: a body that is not valid JSON gets a 422 whose detail is a list of validation objects with no code at all.
Status codes
DID format
Endpoints that accept a DID path parameter support two formats:- Full DID:
did:peaq:0xabc123... - Raw address:
0xabc123...
did:peaq: prefix internally before querying the chain.
The monetization endpoints are the exception. Their key parameter takes a full DID or a decimal machine id, and rejects a raw address with INVALID_REQUEST.
MCR API endpoints
GET /mcr/{did}
Machine Credit Rating score, rating, bond status, event counts, and revenue trend for a single machine.
GET /machine/{did}
Full machine profile with data visibility-dependent fields (private, onchain, or public).
GET /operator/{did}/machines
Paginated list of machines registered under an operator, with per-machine MCR scores.
GET /metadata/{token_id}
NFT metadata for a MachineNFT token. Same response shape as /machine/.
GET /machines/{machine_id}
peaqOS Machine Card for a machine, including services, registrations, and operator info.
GET /health and /ready
Liveness and readiness probes for health checks and monitoring.
GET /machine/{key}/monetization
Current monetization opt-in state for a machine: status, signer, and last update.
PUT /machine/{key}/monetization
Signed opt-in or opt-out toggle. The only signature-verified write on this API.
Machine Markets API
Separate surface, separate host (orchestrator deployment). Pairing, delegation policy, skill registry, service catalogue, and market search.Machine Markets API overview
Base path, access model, error codes, common types, and the full Machine Markets endpoint surface.

