API

सर्वर, बैलेंस, keys और सपोर्ट टिकट REST API से मैनेज किए जा सकते हैं। इंसानों और AI के लिए विवरण: OpenAPI और llms.txt।

शुरुआत

Address: https://0x.cloud/v1. Format: JSON. Time: UTC. Amounts: US dollars. Errors come as {"error": {"code": "...", "message": "..."}}.

You connect to the server through the web console in the dashboard. An administrator tops up the balance when you contact support.

Keys

डैशबोर्ड के "API और MCP" सेक्शन में key बनाएँ। key की अनुमतियाँ, प्रति मिनट अनुरोधों की सीमा और वैधता अवधि होती है। key सिर्फ़ एक बार दिखाई जाती है।

curl https://0x.cloud/v1/servers \
  -H "Authorization: Bearer $TOKEN"

बिना बनाए कीमत

सर्वर बनाने के अनुरोध में "dry_run": true जोड़ें: सटीक कीमत, अवधि pricing_expires_at और अपारदर्शी pricing_fingerprint मिलेंगे; कुछ नहीं बनेगा और कुछ नहीं कटेगा। कोटेशन 10 मिनट तक मान्य है: इसे मालिक को दिखाएँ, और फ़िंगरप्रिंट को न बदलें, न खुद बनाएँ।

curl https://0x.cloud/v1/servers \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"plan": "s1-2", "billing_cycle": "hourly", "dry_run": true}'

→ {"dry_run": true, "currency": "USD", "plan": "s1-2", "billing_cycle": "hourly", "monthly_usd": "7.99", "hourly_usd": "0.010945", "total_usd": "0.00", "pricing_expires_at": "…", "pricing_fingerprint": "…"}

सर्वर बन गया

curl https://0x.cloud/v1/servers \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{"plan": "s1-2", "os_template": "Ubuntu 24.04", "billing_cycle": "hourly", "ttl_hours": 6, "pricing_fingerprint": ""}'

→ {"data": {"id": "srv_8f3k2m9x4qpz7w1c", "status": "provisioning", ...}, "username": "root", "password": "..."}

Create only after the owner explicitly agreed to the price. On 409 price_changed nothing was created or charged: show error.quote, get a new yes and use the new quote with a new Idempotency-Key; never repeat the order automatically. After an unknown network outcome you may repeat only the same body with the same fingerprint and key while the quote is valid. A plan with is_auto_provision: false is issued by a person: get the same quote first, after an explicit yes send POST /v1/server-requests with accept_manual_issue: true and its pricing_fingerprint; this is a request, the server is issued by hand once capacity is confirmed. The root password is shown once. Wait for the installation: GET /v1/servers/srv_8f3k2m9x4qpz7w1c/wait?timeout=25 – repeat while the answer has "ready": false. With ttl_hours the server deletes itself and the unused rest returns to the balance. A deleted server can be brought back within 24 hours: POST /v1/servers/srv_8f3k2m9x4qpz7w1c/restore.

एजेंट एक्सेस

A human creates the account on the website. They issue the agent a key in the dashboard, under “API”, and set its permissions, spend limit and expiry themselves. MCP clients that support sign-in connect without a key. A new account’s balance is $0.00: top it up through support before the first server.

GET  /v1/overview                                 → key, balance, servers in one answer
GET  /v1/balance                                  → what is left on the balance
POST /v1/servers  {"plan": "s1-2", "dry_run": true} → the price without creating

MCP

MCP सर्वर का पता: https://0x.cloud/v1/mcp (Streamable HTTP)। ऑथराइज़ेशन: वही API key, Authorization: Bearer हेडर में। टूल्स: प्लान और इमेज, बैलेंस, सर्वर सूची, सर्वर बनाना, मैन्युअल जारी करने का अनुरोध, पावर, पासवर्ड रीसेट, रीइंस्टॉल, डिलीट और रिस्टोर, सपोर्ट टिकट। डिलीट और रीइंस्टॉल के लिए साफ़ पुष्टि confirm: true ज़रूरी है।

curl https://0x.cloud/v1/mcp \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc": "2.0", "id": 1, "method": "tools/list"}'

वेबहुक और दोहराव

वेबहुक सर्वर, बैलेंस और सपोर्ट टिकट से जुड़े इवेंट्स आपके https पते पर भेजता है। हर इवेंट साइन किया होता है: हेडर X-0x-Signature: t=<time>,v1=<signature>, सिग्नेचर वेबहुक सीक्रेट के साथ स्ट्रिंग t.body का HMAC-SHA256 है। डिलीवरी विफल होने पर छह बार तक दोबारा कोशिश होती है।

curl https://0x.cloud/v1/webhooks \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"url": "https://example.com/hooks/0x", "events": ["server.created", "server.deleted"]}'

The Idempotency-Key header makes a repeated POST, PATCH or DELETE safe: the same key with the same body within 24 hours returns the stored answer instead of doing the action twice. Use the API with curl or any HTTP client.

सभी मेथड

सेक्शनमेथड
सर्वरGET/POST /servers · GET/PATCH/DELETE /servers/{id} · POST /servers/{id}/restore · POST /servers/{id}/freeze · POST /servers/{id}/unfreeze
कार्रवाइयाँPOST /servers/{id}/power · /install · /password-reset · /resize · GET /servers/{id}/state · /wait · /metrics · /history
कैटलॉगGET /plans · /images · /locations · /public/pricing
पैसेGET /balance · /transactions · /topups · /payment-methods · /deposit-addresses · /withdrawals
अकाउंटGET /overview · GET /account · /api-keys · /ssh-keys · /referrals
सपोर्टGET/POST /tickets · GET /tickets/{id} · POST /tickets/{id}/messages
इंटीग्रेशनGET/POST /webhooks · POST /webhooks/{id}/test · GET /webhooks/{id}/deliveries · POST /mcp
API में नहींcommand-line tool and SDK