Every Button in the Dashboard Is an Endpoint
A JSON REST API over HTTPS for creating, rebuilding, snapshotting and measuring KVM instances across all twelve locations. No XML, no session cookies, no undocumented behaviour: what the dashboard can do, the API can do, and every limit the API enforces is written down below.
REST · JSON · Bearer tokens · Read with the Terms of Service, Privacy Policy and Abuse PolicyFourteen Sections, Copy-Paste Ready
Read top to bottom once, then use it as a lookup. Every example is a real request shape against the live API, and every limit quoted here is the limit actually enforced by the gateway.
What the API controls
The API manages infrastructure. It creates servers, changes their state, moves data and reports what is happening. It does not touch money: there is no endpoint to place an order, change a billing term, issue a refund or store a payment method.
In the API
Everything below is available to a read-write key.
- ✓Instances: create, list, reboot, shut down, power cycle, rebuild, resize, reinstall, destroy.
- ✓Snapshots: create, restore, schedule, export to a standard image format.
- ✓Networking: IPv4 and IPv6, firewall rulesets, reverse DNS, rescue mode.
- ✓Access: SSH keys, VNC console URL, user data for first boot.
- ✓Observability: live and historical CPU, memory, disk I/O and bandwidth; region stock.
Dashboard Only
Deliberate, not an omission.
- ✕Placing an order — checkout runs through PayPal on a hosted page, never through a token.
- ✕Requesting or issuing a refund, which follows the windows in the Refund Policy.
- ✕Reading or writing payment details — no KizunaCloud system stores card data, so no endpoint can return it.
- ✕Changing the email on the account or closing it, to stop a stolen key from locking out its owner.
Base URL and versioning
One base URL for all regions. Traffic is routed to the facility that holds the instance, so you never build region-specific endpoints.
https://api.kizunacloud.shop/v1
- •The major version sits in the path. Additive changes never ship under a bumped version — new fields and new endpoints arrive without warning, so ignore what you do not recognise.
- •A breaking change means a new version path, with the old version kept live for at least twelve months and a deprecation notice in the response headers throughout that period.
- ✕HTTPS only. Plain HTTP requests are refused at the edge, not redirected, so credentials cannot travel in clear text by accident.
Authentication
Send an API key as a bearer token. Keys are opaque strings, not JWTs, so nothing about your account is readable from the token itself.
# list every instance on the account curl -s https://api.kizunacloud.shop/v1/instances \ -H "Authorization: Bearer kz_live_9f2c81a4d6e7b305" \ -H "Accept: application/json"
| Key prefix | Environment | Behaviour |
|---|---|---|
| kz_live_ | Production | Acts on real instances and real billing periods |
| kz_test_ | Sandbox | Full request surface, no instance created, no charge, no rate penalty |
Every key is bound to one account and one IP range you choose. A key created from a dashboard session can be locked to your CI runner's address; a request from anywhere else returns 403 key_ip_mismatch and raises a security notice to the account email.
Creating and scoping keys
The default scope is the widest one, and the default is the wrong answer for almost every automation. Scope down at creation, because you cannot narrow a key after the fact without rotating it.
curl -s -X POST https://api.kizunacloud.shop/v1/api-keys \ -H "Authorization: Bearer kz_live_9f2c81a4d6e7b305" \ -H "Content-Type: application/json" \ -d '{ "label": "ci-snapshotter", "access": "read_write", "scopes": ["snapshots:write", "instances:read"], "instance_ids": ["iad-04e1b7"], "source_ips": ["203.0.113.24"] }'
| Field | Accepts | Notes |
|---|---|---|
| label | String, 64 chars | Shown in the dashboard audit log; make it name the job |
| access | read_only, read_write | read_only rejects every mutating verb with 403 |
| scopes | Array of scope strings | Omit for account-wide; list explicitly for automation |
| instance_ids | Array of instance IDs | Key cannot see or touch anything outside this list |
| source_ips | Array of IPv4 or CIDR | Enforced at the edge before your request reaches logic |
| expires_at | ISO 8601 timestamp | Recommended. A key that dies on schedule beats one you forget |
The full secret is returned once, in the creation response, and is never retrievable again. Losing it means creating a new key and revoking the old one — which is the point: a stolen database of key hashes is useless to an attacker.
Rate limits
Limits exist so one badly written script cannot degrade the control plane for every other customer. They are generous for normal automation and obvious when hit.
| Class | Limit per key | Burst |
|---|---|---|
| Read — GET | 10 requests / second | 30 |
| Write — POST, PUT, PATCH | 5 requests / second | 10 |
| Destroy — DELETE | 2 requests / second | 4 |
| Instance create | 20 requests / hour | Rolling window |
| Sandbox kz_test_ | Exempt from the create cap | Still capped at 50/s total |
Every response carries the current state, so you can throttle before you are rejected rather than after:
X-RateLimit-Limit: 10 X-RateLimit-Remaining: 7 X-RateLimit-Reset: 1 Retry-After: 1 # present only on 429
A 429 is not a block and never escalates. Back off for the Retry-After value and continue. If a legitimate workload needs a higher ceiling — a large fleet rebuild, for instance — ask in a ticket and the limit is raised on the account rather than guessed at by you.
Request conventions
Four rules that apply to every endpoint, stated once here rather than repeated sixty-two times.
- •Content type:
application/json, UTF-8. Requests without the header are rejected with415rather than guessed at. - •Idempotency: send
Idempotency-Key: <uuid>on any POST. A retried create returns the original resource and200, not a second instance. Keys are held for 24 hours. - •Pagination: cursor based, not offset. Pass
?limit=50&cursor=…; the response carriesnext_cursor, which isnullon the last page. Cursors stay valid while the collection mutates underneath you. - •Timestamps: ISO 8601 in UTC with an explicit offset on input, normalised to UTC on output. Durations are integer seconds.
Responses and errors
One envelope for success, one for failure, and a machine-readable reason code that never changes meaning between releases.
{
"id": "sgp-19c4a2",
"status": "active",
"region": "singapore",
"plan": "kvm-2",
"vcpu": 2,
"memory_mb": 4096,
"disk_gb": 80,
"ipv4": "198.51.100.42",
"ipv6": "2001:db8:42::/64",
"created_at": "2026-11-04T06:41:19Z"
}
| Status | Code | Meaning and what to do |
|---|---|---|
| 400 | invalid_request | A field is missing or malformed. details[] names each one |
| 401 | unauthorised | No key, expired key or revoked key. Do not retry the same credential |
| 403 | insufficient_scope | Valid key, wrong permission. Check scopes on the key |
| 403 | key_ip_mismatch | Request came from outside source_ips. Expected on a moved runner |
| 404 | not_found | Unknown ID, or an instance belonging to another account — deliberately identical |
| 409 | invalid_state | Operation not allowed in the current state, e.g. resize while building |
| 422 | region_unavailable | Requested region is out of stock. alternatives[] lists what is |
| 429 | rate_limited | Back off for Retry-After. Safe to retry |
| 500 | internal_error | Our fault. The response carries a request ID; send it in a ticket |
| 503 | maintenance | Control plane only — running instances are unaffected |
Instances
The core collection. A create returns 202 immediately with the instance in building; poll the resource or subscribe to the webhook in section 12. Median time from 202 to active is 59 seconds, matching the Delivery Policy.
| Method | Path | Action |
|---|---|---|
| GET | /instances | List, filter by region, status or tag |
| POST | /instances | Create: region, plan, image, SSH keys, user data |
| GET | /instances/{id} | Read one instance with current state |
| PATCH | /instances/{id} | Rename, retag, change reverse DNS or firewall |
| POST | /instances/{id}/actions | reboot, shutdown, power_cycle, rescue, unrescue |
| POST | /instances/{id}/rebuild | Reinstall an image; disk is wiped |
| POST | /instances/{id}/resize | Change plan; needs a stop, keeps data |
| GET | /instances/{id}/console | Time-limited VNC URL, valid 30 minutes |
| DELETE | /instances/{id} | Destroy. Data recovery window follows the Privacy Policy |
curl -s -X POST https://api.kizunacloud.shop/v1/instances \ -H "Authorization: Bearer kz_live_9f2c81a4d6e7b305" \ -H "Idempotency-Key: 6b1f0c2e-3d9a-4f77-9c11-8ae2f5b0d340" \ -H "Content-Type: application/json" \ -d '{ "region": "singapore", "plan": "kvm-2", "image": "ubuntu-24.04", "ssh_keys": ["gh-anthang"], "backups": true, "user_data": "#!/bin/sh\napt-get update -y" }'
Available images: Ubuntu 24.04 LTS, Debian 12, AlmaLinux 9, Rocky Linux 9, openSUSE Tumbleweed, FreeBSD 14 and licensed Windows Server 2019 / 2022. A custom ISO is mounted through /instances/{id}/iso and is treated as a manual delivery of up to four hours, exactly as the Delivery Policy states.
Snapshots and backups
Snapshots are the reason most automation uses this API at all. They are incremental, taken without downtime, and exportable in a standard image format — which is what makes the migration position in the Delivery Policy true rather than aspirational.
| Method | Path | Action |
|---|---|---|
| GET | /instances/{id}/snapshots | List with size, state and age |
| POST | /instances/{id}/snapshots | Take one now |
| PATCH | /snapshots/{id} | Rename or protect from rotation |
| POST | /snapshots/{id}/restore | Roll the instance back; needs a stop |
| GET | /snapshots/{id}/export | Signed download URL, valid 60 minutes |
| DELETE | /snapshots/{id} | Remove; frees quota immediately |
Keep your own copy off-platform. The Terms of Service place backup responsibility with the account holder: snapshots survive a failed disk, not a terminated account or a facility-level event. The export endpoint exists so "off-platform" is one cron line, not a project.
Networking and firewall
Firewall rulesets are applied at the hypervisor, so a bad rule cannot be bypassed from inside the guest — and a correct one never needs a reboot.
| Method | Path | Action |
|---|---|---|
| GET | /firewalls | List rulesets and their attached instances |
| POST | /firewalls | Create a ruleset |
| POST | /firewalls/{id}/rules | Add inbound rule: protocol, port range, source CIDR |
| DELETE | /firewalls/{id}/rules/{n} | Remove one rule by index |
| POST | /instances/{id}/ips | Attach an additional IPv4, billed per the plan |
| PATCH | /ips/{ip} | Set reverse DNS for an address |
Port 25 is closed by default and cannot be opened through the API. Outbound SMTP on 465 and 587 works normally. Opening port 25 is a human decision under clause 3 of the Abuse Policy, so it is made in a ticket where the use case can be read.
Metrics and usage
The same series that draws the dashboard graphs, at the same resolution. Metrics are retained 90 days at full resolution and aggregated afterwards, which is also the window the uptime figure in the Terms of Service is measured over.
curl -s "https://api.kizunacloud.shop/v1/instances/sgp-19c4a2/metrics?metric=bandwidth_out&aggregate=hour&since=-P7D" \ -H "Authorization: Bearer kz_live_9f2c81a4d6e7b305"
| Metric | Unit | Aggregations |
|---|---|---|
| cpu | Percent of allocated vCPU | raw, 5 min, hour, day |
| memory | Megabytes used | raw, 5 min, hour, day |
| disk_read, disk_write | IOPS and MB/s | 5 min, hour |
| bandwidth_in, bandwidth_out | Bytes per interval | hour, day, month |
| uptime | Percent, per region | month — feeds the credit calculation |
Webhooks
Subscribe to state changes instead of polling. Delivery is retried with exponential backoff for up to six hours, and every attempt is signed so you can prove it came from us.
| Event | Fires when |
|---|---|
| instance.created | Build starts, status building |
| instance.active | Reachable and credentials issued — the delivery moment |
| instance.failed | Build could not complete; triggers the refund path |
| instance.suspended | Enforcement action under the Abuse Policy, with the clause cited |
| snapshot.completed | Snapshot ready for restore or export |
| backup.failed | Scheduled backup missed, so you can take one manually |
| ddos.detected | Mitigation engaged on your instance, with volume and duration |
| invoice.due | Renewal approaching; the amount is informational, never charged here |
# the raw body, not a re-serialised one expected = hmac.new(secret, body, hashlib.sha256).hexdigest() if not hmac.compare_digest(expected, header["X-Kizuna-Signature"]): return Response(status_code=401)
Respond 2xx within five seconds. Anything slower is treated as a failure and retried, so acknowledge first and do the work on your side. A webhook endpoint that returns 401 on a valid signature is the single most common cause of "we stopped sending" tickets.
Command line tool
A thin wrapper over the same API, so anything you script by hand today is the same call tomorrow. It holds no privilege the API does not, and it writes nothing to your server.
kizuna auth # paste a key, stored in your OS keyring
kizuna instances ls --region sgp
kizuna snapshot new sgp-19c4a2 --label pre-upgrade
kizuna instance rebuild sgp-19c4a2 --image debian-12 --confirm
kizuna metrics bandwidth_out sgp-19c4a2 --since 30d --chart
- ✓Destructive verbs require
--confirmor a--yesflag; there is no silent destroy path in the binary. - ✓Output is
--jsonfor scripts and a table for humans, on every command. - •Any language that speaks HTTPS is a client. There is no official SDK to fall behind the API, because there is nothing for one to wrap beyond the reference above.
Safety rails
Four behaviours built into the API because automation makes mistakes faster than people do.
Guarded by Default
On unless you turn them off deliberately.
- ✓Destruction limit: at most 25% of an account's instances may be deleted in one hour without
?force=true. - ✓Free snapshot taken automatically before any rebuild or resize, held 7 days.
- ✓Audit log of every mutating call for 12 months: key, IP, action, target, result.
- ✓Instant email on the first use of a key from an unseen IP range.
Where to Get Help
Same queue as everything else.
- •Open a ticket with the request ID from the response and the endpoint path. That is usually the whole investigation.
- •Median first reply is eleven minutes, the same queue that answers billing and abuse.
- •Control-plane incidents appear on the status page before they appear in your logs.
- ✕API keys are personal credentials. Sharing one across a team is a Terms of Service violation; create a key per job instead.
Measured From the Gateway, Last 90 Days
The same figures drive the uptime commitment in the Terms of Service and the provisioning target in the Delivery Policy. If one moves, every policy page is updated with it.
Money Stays in PayPal
No endpoint places an order, moves a payment or returns a card detail. Billing lives on the hosted PayPal page. Section 1.
Keys Are Personal Data
Metadata about key use is retained under the Privacy Policy and never shared with a third party without a lawful order.
Abuse Rules Apply to Bots
An automated workload that breaches the Abuse Policy is enforced exactly as a manual one would be. Section 10 and section 12.
Need a Higher Limit or a Second Pair of Eyes?
Describe the workload and the endpoint you are stuck on. An operator who maintains this API answers, with the request ID from your response if you have one.
Talk to an API EngineerThis documentation describes the service but does not replace it. Where text and behaviour differ, the Terms of Service prevail on matters of conduct, the Refund Policy on refunds, the Privacy Policy on data handling, and the Abuse Policy on acceptable use. API keys are credentials of the account that issued them.
