API Documentation

v1.0

Quản lý API Keys

Xác thực

Tất cả API requests cần gửi kèm API key trong header Authorization.

Header Format

Authorization: Bearer sk_live_xxxxxxxxxxxx

Tạo API key tại Dashboard → API Keys.

read

Xem VPS, sản phẩm, ví

write

Tạo, gia hạn, nâng cấp VPS

admin

Quản lý user, thống kê

Ví dụ

cURL

curl -H "Authorization: Bearer sk_live_your_key_here" \
  https://your-domain.com/api/v1/products

JavaScript

const res = await fetch("https://your-domain.com/api/v1/products", {
  headers: { "Authorization": "Bearer sk_live_your_key_here" }
});
const data = await res.json();
console.log(data.products);

Python

import requests

headers = {"Authorization": "Bearer sk_live_your_key_here"}
res = requests.get("https://your-domain.com/api/v1/products", headers=headers)
print(res.json())

Sản phẩm VPS

Hệ điều hành

Chu kỳ thanh toán

VPS

Mã lỗi

HTTP CodeMô tả
200Thành công
400Request không hợp lệ (thiếu params, số dư không đủ...)
401API key không hợp lệ, hết hạn, hoặc bị vô hiệu hóa
403Không đủ quyền (VD: gọi POST với key chỉ có quyền read)
404Không tìm thấy (VPS không tồn tại hoặc không sở hữu)
429Quá nhiều requests (vượt rate limit)
500Lỗi server

Rate Limits

Requests per minute60
Per API keyMỗi key có rate limit riêng

Nếu vượt quá giới hạn, bạn sẽ nhận HTTP 429. Đợi 1 phút rồi thử lại.

API v1.0 • Tạo API Key • Cần hỗ trợ? Tạo ticket
API Documentation | Cloud Start