# Kyun > Privacy-focused cloud hosting. KVM virtual machines (Danbo), on-demand Linux containers (Mesa), and object storage (Bricks). Pay with Monero. No KYC. Kyun exposes a fully documented REST API (OpenAPI v2) that lets you create an account, fund it with Monero, buy cloud resources, install operating systems, and run commands — all without a browser. ## API & docs - OpenAPI v2 (machine-readable JSON): https://api.sigma.kyun.sh/endpoints/v2/json - Human-readable API docs (Scalar): https://api.sigma.kyun.sh/endpoints?version=v2 - MCP server card (Streamable HTTP at /mcp): https://api.sigma.kyun.sh/.well-known/mcp/server-card.json - Agent skills index: https://api.sigma.kyun.sh/.well-known/agent-skills/index.json - RFC 9727 API catalog (linkset): https://api.sigma.kyun.sh/.well-known/api-catalog ## Autonomous onboarding (account → Danbo → install → serial) 1. GET /v2/etc/registration — check if registration is open or invite-only. 2. GET /v2/etc/pow — fetch a proof-of-work challenge. Solve: find a string `proof` so SHA-256(challenge + proof) hex starts with `difficulty` zeros. Use a fast language (node/python), not a bash loop — difficulty 5 needs ~1M iterations. Submit immediately (challenges expire in 2 minutes). 3. PUT /v2/account — create account with { password, pow: { challenge, signature, proof } }. Use the returned session.token as x-auth-token. 4. GET /v2/datacenters — list datacenters; use `id` (e.g. `ro` for Romania) as datacenterId. 5. POST /v2/datacenters/{datacenterId}/offers/{serviceType} — body { selection: { cores, ram, disk, ipv4Count, ipv6Enabled } } — confirm availability + limits for your spec (serviceType = danbo|mesa|bricks). 6. PUT /v2/services/danbo — create a draft order { idempotencyKey, datacenterId, specs: { cores, ram, disk }, ipv4Count }. The response is an order ref { kind: "order", id }. Then GET /v2/orders/{id} to read chargeNowMinor (EUR cents to charge now) and newRecurringPriceMinor (new monthly recurring). You need chargeNowMinor to know how much to deposit. 7. POST /v2/deposits { amount: chargeNowMinor / 100, currency: "eur" } — creates a deposit; the response includes a Monero `address` and the `xmr` amount (atomic units = 1e12 per XMR) to send. Fund it via Monero JSON-RPC (check env for KYUN_WALLET_RPC, default http://$KYUN_LOCAL_IP:28083/json_rpc, and KYUN_MONEROD_RPC, default http://$KYUN_LOCAL_IP:28081/json_rpc). The envelope is `{"jsonrpc":"2.0","id":"0","method":METHOD,"params":{...}}` — note the key is `params`, not `args`, and all arguments go INSIDE `params`, never at the JSON root. Flow: (a) `get_address` params `{"account_index":0}` → your wallet address; (b) `refresh` params `{}`; (c) `get_balance` params `{"account_index":0}` → `unlocked_balance` in atomic units (1 XMR = 1e12); (d) if unlocked < required, mine via monerod `generateblocks` params `{"wallet_address":YOUR_ADDRESS,"amount_of_blocks":80}`; (e) `refresh` again; (f) `transfer` params `{"destinations":[{"amount":ATOMIC_AMOUNT,"address":DEPOSIT_ADDRESS}],"account_index":0,"priority":1,"get_tx_key":true}`; (g) mine 1 more block via `generateblocks` then `refresh` to finalize. Poll GET /v2/deposits/{id}/status until receivedAll=true. 8. POST /v2/orders/{orderId}/confirm — execute the order. Poll GET /v2/orders/{orderId} until completed. 9. GET /v2/datacenters/{datacenterId}/osCatalog — get the OS image catalog with resolved URLs and checksums. 10. POST /v2/services/danbo/{danboId}/cloudInit — start the install with { imageUrl, osName, checksum } where checksum is the { type, sum } object from the catalog (pass it through unchanged). 11. GET /v2/services/danbo/{danboId}/tasks/{taskId} — monitor until status is succeeded. 12. POST /v2/services/danbo/{danboId}/serial/ticket — mint a one-time ticket, then open the WebSocket /v2/services/danbo/{danboId}/serial?ticket=... and send commands. ## Authentication - Header: `x-auth-token: ` for all authenticated calls. - Dangerous operations (cloud-init, serial, SSH keys) require `x-otp-code` only if 2FA is enabled. New accounts have no 2FA. ## Links - [OpenAPI v2 JSON](/endpoints/v2/json) - [API docs](/endpoints?version=v2) - [MCP server card](/.well-known/mcp/server-card.json) - [Agent skills](/.well-known/agent-skills/index.json) - [API catalog](/.well-known/api-catalog)