
# A VPS API built for scripts, CI and AI agents

**A VPS API lets code, not a person clicking through a dashboard, create and delete servers: your scripts, your CI pipeline, an n8n workflow or an AI agent.** 0x.cloud ships a REST API described in OpenAPI, an llms.txt file for language models, and an MCP server for Claude, ChatGPT and Cursor. Every key is scoped by permissions and a monthly spend cap, and a create request with `dry_run` returns the exact price without creating anything. Servers start at $4.49/mo or bill hourly.


[Create server: s1-2, $7.99/mo](https://0x.cloud/cabinet/create?plan=s1-2)



## Why manage servers through an API

- **Ephemeral environments.** CI spins up a server for tests or a build and deletes it an hour later. Hourly billing keeps that cheap.
- **n8n automation.** A workflow creates a server when a customer orders one, and a webhook reports back.
- **AI agents.** Claude Code or Codex picks a plan, checks the price and creates the server it needs.
- **Your own product.** You sell ready-made installs (a bot or an agent) and create a server per customer from your code.
- **Infrastructure as code.** Your servers live in a repo and a script recreates them.
- **Load tests.** A handful of servers for two hours, deleted when the test ends, instead of a month of fees.

## What the 0x.cloud VPS API gives you

| Feature | What it means |
|---|---|
| REST API + OpenAPI | predictable requests, generated clients in any language |
| llms.txt | an API summary that models read as-is ([llms.txt format](https://llmstxt.org/)) |
| MCP server | Claude, ChatGPT and Cursor manage servers from chat |
| `dry_run` | the exact price of a request with nothing created |
| Key permissions | separate read, create and delete rights |
| Monthly spend cap | a key can't buy anything new past the cap |
| n8n integration | HTTP Request node and webhooks |

The API exposes the same plans as the dashboard: s1-1 ($4.49), s1-2 ($7.99), s2-4 ($15.99) and s4-8 ($31.99) per month, with Ubuntu 24.04, Debian 12, AlmaLinux 9, AI agents and Bots images. Setup and reinstalls are free. Hourly rates and 3, 6 and 12-month discounts are on the [VPS pricing](https://0x.cloud/pricing) page.

## Your first request: a price without a server

Create a key in the dashboard and set its permissions and cap there; see [API keys](https://0x.cloud/kb/api-mcp/api-keys). Keep the key in an environment variable, never in code.

```bash
export OX_API_KEY="your_key"

# a create request with dry_run: returns the price, creates nothing
curl https://0x.cloud/v1/servers \
  -H "Authorization: Bearer $OX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"plan": "s1-2", "billing_cycle": "hourly", "dry_run": true}'
```

The same call in Python:

```python
import os, requests

r = requests.post(
    "https://0x.cloud/v1/servers",
    headers={"Authorization": f"Bearer {os.environ['OX_API_KEY']}"},
    json={"plan": "s1-2", "billing_cycle": "hourly", "dry_run": True},
    timeout=30,
)
print(r.json())  # exact price, no server created
```

The response includes the monthly and hourly price, the total, and a `pricing_fingerprint`: a confirmed quote valid for 10 minutes. To create the server, send the same request without `dry_run`, with that `pricing_fingerprint` unchanged and an `Idempotency-Key` header, so a retry after a dropped connection can't create a second server. If the price changed in the meantime, the API returns `409 price_changed` with a fresh quote and charges nothing. Full walkthroughs with responses and errors: [API quickstart](https://0x.cloud/kb/api-mcp/api-quickstart) and [dry_run pricing](https://0x.cloud/kb/api-mcp/dry-run).

## VPS API for AI agents: MCP

Your agent doesn't have to write HTTP calls. Connect the MCP server at `https://0x.cloud/v1/mcp` to Claude, ChatGPT or Cursor and the assistant gets tools to price, create, list and delete servers and check your balance. In Claude and ChatGPT you can skip creating a key and sign in with OAuth instead. Details are on the [0x.cloud MCP server](https://0x.cloud/mcp) page.


```text
Read the 0x.cloud API from its llms.txt. Use dry_run to compare hourly prices for s1-2 and s2-4, then create an s1-2 with Ubuntu 24.04 and tell me its ID and status. Show me the price and wait for my confirmation before creating it. Don't spend more than $10 and don't delete anything.
```


## Key safety: no surprise bills

An API that creates servers spends money, so the guardrails live on the key, not in your script's good intentions:

1. **One key per system.** CI, n8n and your agent each get their own key, so you can revoke them one at a time.
2. **Least privilege.** A new key gets all server scopes by default (`servers.*`, including delete and running commands as root), so trim it. Monitoring needs read only; `dry_run` quotes need create; grant delete only where it's required.
3. **A monthly spend cap.** A runaway loop stops creating servers at the cap; servers it already started keep billing until deleted.
4. **`dry_run` first.** Your code checks the price against what it expects before creating.
5. **Log calls on your side.** Record every create and delete with the key, plan and dry_run price, so you can tell which system made an extra server.

Delete a server and charges stop at once, the remainder returns to your balance, and an accidentally deleted server can be restored within 24 hours.

## VPS API: 0x.cloud and the big clouds

Large clouds publish REST APIs too, for example [DigitalOcean](https://docs.digitalocean.com/reference/api/) and [Hetzner Cloud](https://docs.hetzner.cloud/) (checked November 20, 2026). What sets 0x.cloud apart is that its API was designed for AI agents from day one: an MCP server, llms.txt, a spend cap on every key and `dry_run` on every create request.

No-code automation? See [0x.cloud and n8n](https://0x.cloud/kb/api-mcp/n8n-integration).

## VPS API FAQ

**What can I do with the 0x.cloud VPS API?**
Get an exact price with `dry_run`, create a server with the plan, image and billing period you choose, list servers, check your balance and delete servers. AI agents get the same actions through the MCP server.

**How do I limit what a VPS API key can do?**
Each API key has its own permissions (read, create, delete) and a monthly spend cap. Give a monitoring key read-only access, and give an agent create rights with a cap such as $20 per month.

**Is there an OpenAPI spec?**
Yes. The REST API is described in OpenAPI, so you can generate a client in any language. There's also an llms.txt file written for language models.

**Does a server created via the API cost more?**
No. API servers cost the same as in the dashboard, from $4.49/mo for s1-1. Hourly billing comes from your balance and never exceeds the monthly price over a month. Delete a server and charges stop immediately.

**Can I create servers from n8n?**
Yes. Use the n8n HTTP Request node with your key in the Authorization header, or webhooks. A sample workflow is in the n8n integration guide.
