API Documentation

API Documentation

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 Policy
62Documented Endpoints
110 msMedian API Response
10/sRead Rate Limit
0Undocumented Fields
Reference

Fourteen 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.

Base URL
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.

cURL · authenticated request
# 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 prefixEnvironmentBehaviour
kz_live_ProductionActs on real instances and real billing periods
kz_test_SandboxFull 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 · create a scoped key
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"]
  }'
FieldAcceptsNotes
labelString, 64 charsShown in the dashboard audit log; make it name the job
accessread_only, read_writeread_only rejects every mutating verb with 403
scopesArray of scope stringsOmit for account-wide; list explicitly for automation
instance_idsArray of instance IDsKey cannot see or touch anything outside this list
source_ipsArray of IPv4 or CIDREnforced at the edge before your request reaches logic
expires_atISO 8601 timestampRecommended. 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.

ClassLimit per keyBurst
Read — GET10 requests / second30
Write — POST, PUT, PATCH5 requests / second10
Destroy — DELETE2 requests / second4
Instance create20 requests / hourRolling window
Sandbox kz_test_Exempt from the create capStill capped at 50/s total

Every response carries the current state, so you can throttle before you are rejected rather than after:

Response headers
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 with 415 rather than guessed at.
  • •Idempotency: send Idempotency-Key: <uuid> on any POST. A retried create returns the original resource and 200, not a second instance. Keys are held for 24 hours.
  • •Pagination: cursor based, not offset. Pass ?limit=50&cursor=…; the response carries next_cursor, which is null on 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.

200 OK · single resource
{
  "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"
}
StatusCodeMeaning and what to do
400invalid_requestA field is missing or malformed. details[] names each one
401unauthorisedNo key, expired key or revoked key. Do not retry the same credential
403insufficient_scopeValid key, wrong permission. Check scopes on the key
403key_ip_mismatchRequest came from outside source_ips. Expected on a moved runner
404not_foundUnknown ID, or an instance belonging to another account — deliberately identical
409invalid_stateOperation not allowed in the current state, e.g. resize while building
422region_unavailableRequested region is out of stock. alternatives[] lists what is
429rate_limitedBack off for Retry-After. Safe to retry
500internal_errorOur fault. The response carries a request ID; send it in a ticket
503maintenanceControl 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.

MethodPathAction
GET/instancesList, filter by region, status or tag
POST/instancesCreate: 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}/actionsreboot, shutdown, power_cycle, rescue, unrescue
POST/instances/{id}/rebuildReinstall an image; disk is wiped
POST/instances/{id}/resizeChange plan; needs a stop, keeps data
GET/instances/{id}/consoleTime-limited VNC URL, valid 30 minutes
DELETE/instances/{id}Destroy. Data recovery window follows the Privacy Policy
cURL · create in Singapore
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.

MethodPathAction
GET/instances/{id}/snapshotsList with size, state and age
POST/instances/{id}/snapshotsTake one now
PATCH/snapshots/{id}Rename or protect from rotation
POST/snapshots/{id}/restoreRoll the instance back; needs a stop
GET/snapshots/{id}/exportSigned 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.

MethodPathAction
GET/firewallsList rulesets and their attached instances
POST/firewallsCreate a ruleset
POST/firewalls/{id}/rulesAdd inbound rule: protocol, port range, source CIDR
DELETE/firewalls/{id}/rules/{n}Remove one rule by index
POST/instances/{id}/ipsAttach 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 · bandwidth, hourly, 7 days
curl -s "https://api.kizunacloud.shop/v1/instances/sgp-19c4a2/metrics?metric=bandwidth_out&aggregate=hour&since=-P7D" \
  -H "Authorization: Bearer kz_live_9f2c81a4d6e7b305"
MetricUnitAggregations
cpuPercent of allocated vCPUraw, 5 min, hour, day
memoryMegabytes usedraw, 5 min, hour, day
disk_read, disk_writeIOPS and MB/s5 min, hour
bandwidth_in, bandwidth_outBytes per intervalhour, day, month
uptimePercent, per regionmonth — 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.

EventFires when
instance.createdBuild starts, status building
instance.activeReachable and credentials issued — the delivery moment
instance.failedBuild could not complete; triggers the refund path
instance.suspendedEnforcement action under the Abuse Policy, with the clause cited
snapshot.completedSnapshot ready for restore or export
backup.failedScheduled backup missed, so you can take one manually
ddos.detectedMitigation engaged on your instance, with volume and duration
invoice.dueRenewal approaching; the amount is informational, never charged here
Verify the signature
# 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.

Shell · typical session
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 --confirm or a --yes flag; there is no silent destroy path in the binary.
  • ✓Output is --json for 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.
API Telemetry

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 Engineer

This 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.