Base URL: · All requests and responses are JSON.
API access is granted per account by the owner @khalid_dev. Once enabled you receive a key starting with kx_. Send it on every request:
Authorization: Bearer kx_your_api_key
# or
X-API-Key: kx_your_api_key
Your account must have your Fly.io token linked in the dashboard (Fly Account) — VPS machines are created on your own Fly account. Rate limit: 120 requests / minute per key. Errors return {"detail": "message"} with an HTTP status (401 bad key, 403 no API access, 429 rate limited).
Your account, Fly link status and VPS quota.
curl /api/v1/me -H "Authorization: Bearer kx_..."
Allowed regions, CPU counts, RAM (MB) and disk (GB) values.
Create a VPS. Returns 202 immediately with status: "DEPLOYING" — poll GET /api/v1/vps/{id} until status is RUNNING (usually 3–5 min). A random suffix is added to name.
curl -X POST /api/v1/vps \
-H "Authorization: Bearer kx_..." -H "Content-Type: application/json" \
-d '{
"name": "my-panel",
"region": "iad",
"cpus": 2,
"memory_mb": 4096,
"storage_gb": 20
}'
Allowed: cpus 1, 2, 4, 8, 16 · memory_mb 1024–65536 (powers of two) · storage_gb 1, 3, 5, 10, 20, 40, 50, 100, 200.
# response
{
"id": 12, "name": "my-panel-a1f3", "status": "DEPLOYING", "region": "iad",
"cpus": 2, "memory_mb": 4096, "storage_gb": 20,
"ipv4": null, "ssh": {"host": null, "port": 22, "user": "root", "password": "…"},
"progress": ["… Queued"], "error": null
}List your VPS machines (without passwords).
Full details including SSH host/port/user/password, deployment progress lines and error if it failed.
Sync status and IPs from Fly.io.
Power actions. Call /refresh a few seconds later to see the new state.
Destroy the machine, volume and Fly app. Irreversible.
DEPLOYING · RUNNING · STOPPED · STARTING · STOPPING · RESTARTING · FAILED
import requests, time API = "https://khalidxhost.zone.id/api/v1" H = {"Authorization": "Bearer kx_your_api_key"} vps = requests.post(f"{API}/vps", headers=H, json={ "name": "bot-host", "region": "fra", "cpus": 2, "memory_mb": 4096, "storage_gb": 20 }).json() while vps["status"] == "DEPLOYING": time.sleep(10) vps = requests.get(f"{API}/vps/{vps['id']}", headers=H).json() print(vps["ssh_command"], vps["ssh"]["password"])
Need API access or have a question?
💜 Message @khalid_dev