Getting Started with the LayerOne Client API
Create a key under Developer, make your first authenticated request, and automate the same server actions available in the portal.
Use the LayerOne client API to deploy, inspect, power-cycle, and destroy your VPS instances from scripts and automation. It supports the same server actions you already use in the portal. Authenticate each request with a Bearer key instead of a browser session.
Unlock hourly billing first
The API stays locked until hourly billing is unlocked on an active account. Suspended or closed is 403. Not yet eligible is 402 with the same reason checkout would show. A 401 still means only a bad key. Refusals do not spend the monthly request allowance.
Create a key
Sign in and open Developer. Create a key, copy the secret when it appears, and store it like a password. You cannot reveal it again later; rotate the key if the secret is lost or exposed.
Call the API
curl -sS https://layeronecloud.com/api/v1/servers/ \
-H "Authorization: Bearer YOUR_KEY"
Use the API reference for endpoints, request bodies, and responses. Give read-only keys to reporting tools and grant write access only to automation that must create or change resources.
Usage and billing
Every account includes 5,000 requests per UTC calendar month. After that, overage is $1.00 per 100,000 requests against credit. The pool is per account, not per key. Counted responses carry X-Api-Quota-* headers; a 401 does not.
Private networks
Create can attach a VNet with private_network and private_ip. Checkout and the API require a public IPv4, or a VNet plus a private IP, or both. See how to set up a virtual network for the panel equivalent.
Start from the client API docs, then deploy a plan when you are ready to automate it.