Getting started
From nothing to a running server, in the order you will actually do it. Every call here is real - copy them, substituting your own token and the identifiers your own calls return (the numbers in these examples belong to another project).
1. Issue a token
Open API tokens in your client area, pick the project you want to manage, and choose an access level. Take read first if you only want to look around; you can issue a second token with write access when you are ready to create things.
The secret is shown once. We keep only its fingerprint, so a lost token is replaced, not recovered.
A token can also get an expiry date - 30, 90 or 365 days - or none. No reminder is sent before a token expires, so give it a date only if your process can replace the token by itself.
2. Make sure it works
curl -H "Authorization: Bearer $FBX_TOKEN" \
https://api.fiberax.com/v1/project
You should get your project back:
{ "data": { "id": 1201, "name": "My Data Center", "status": "Active" } }
If this returns 401, the code in the answer says why:
invalid_token - the token is wrong or revoked; token_expired - its expiry
date has passed, issue a new one; unauthorized - the header is missing. If it returns
403, the token is fine but its access level is lower than the call needs.
3. Look at what you can create
Server types differ in how they are sized, and that changes what the create call must carry. Read them first:
curl -H "Authorization: Bearer $FBX_TOKEN" \
https://api.fiberax.com/v1/server-types
There are three ways a type can be sized, and the mode says which one applies. A type with
"pricing_mode": "plans" is bought by the plan - you send plan_id and must
not send cores, memory_mb or disk_gb. A type with
"pricing_mode": "sliders" is the other way round: the three numbers, no plan. A type
with "pricing_mode": "fixed" is bought as a ready package - one field,
gpu_package, and the size fields are refused next to it (see
GPU servers). Sending the wrong set is refused with
422 rather than quietly interpreted.
Then list the images that type offers, and the prices:
curl -H "Authorization: Bearer $FBX_TOKEN" \
"https://api.fiberax.com/v1/server-types/4/images"
curl -H "Authorization: Bearer $FBX_TOKEN" \
"https://api.fiberax.com/v1/server-types/4/pricing"
The image list also contains your own uploaded ISO images, marked "type": "useriso"
and identified as uiso-N. A server cannot be created from one of those - the
request is refused with image_not_supported. An ISO installs a machine rather than
builds one: create the server from an operating system image and insert the ISO into its drive
afterwards.
Two other kinds of entry are worth recognising. "type": "router" builds a router, not
a server: its create call takes only a public address and exactly one private network, and refuses
a name, a size, keys and a password with router_field_not_supported. An image with
"licensed": true (Windows) adds a per-core licence charge - the license_*
rate in the prices, for at least 8 cores: a 2-core server pays the licence for 8 - and its create
call must carry "accept_license": true.
The prices are hourly rates per unit: maxcpu_on per core, maxmem_on per
GB of memory, maxdisk per GB of disk, ipv4_addresses per public address.
A slider server pays for its cores and memory while it runs and for its disk always, at these
rates, plus its addresses; the full list of keys is described in the reference, under the prices of
a server type.
4. Add your SSH key
Keys live in your account pool, so this is done once and every project sees them:
curl -X POST -H "Authorization: Bearer $FBX_TOKEN" \
-H "Content-Type: application/json" \
-d '{"name":"laptop","public_key":"ssh-ed25519 AAAA... you@laptop"}' \
https://api.fiberax.com/v1/ssh-keys
The answer carries the key's id - the number you put into ssh_keys when
you create a server:
{ "data": { "id": 126, "name": "laptop", "public_key": "ssh-ed25519 AAAA... you@laptop" } }
A number that is not one of your keys is refused with ssh_key_not_found (404), and
the answer names the number.
5. Create a server
On a slider type, with a fresh public address and your key:
curl -X POST -H "Authorization: Bearer $FBX_TOKEN" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: first-server-2026-08-19" \
-d '{
"name": "web-01",
"server_type_id": 4,
"image": "fcf9f69c8630904c1d6d73a821f4e674",
"cores": 2,
"memory_mb": 4096,
"disk_gb": 40,
"public_ipv4": { "new": true },
"ssh_keys": [126]
}' \
https://api.fiberax.com/v1/servers
The answer comes back before the server is ready:
{
"data": { "id": 10871, "name": "web-01", "status": "creating", ... },
"task": { "id": "8f3c...", "status": "pending", "is_terminal": false,
"poll": "/v1/tasks/8f3c..." }
}
You already have the identifier - use it. The Idempotency-Key above matters: if the
connection drops and you repeat the call with the same key, you get the same server back instead of
a second one you did not want.
A refusal about the request itself is remembered under that key too, for a day - such as
ssh_key_not_found, or a 422 the operation itself gave. After fixing such a
request, send a NEW key: repeating with the old one returns the stored refusal, and a changed body
under a key that holds an answer is rejected as idempotency_key_reused (422). Refusals
about circumstances are not stored: after a 409 or a 402, fix what the
answer names and repeat the same request with the same key. Nor are refusals that come before the
key is taken - a missing or expired token, the rate limit, a body that is too large or not JSON, a
body or query that fails validation (invalid_request): fix them and repeat with the same
key. After a 5xx, read
the resource first, then retry with a new key.
6. Wait for it
curl -H "Authorization: Bearer $FBX_TOKEN" \
https://api.fiberax.com/v1/tasks/8f3c...
Poll until is_terminal is true. Then read the server itself - the task tells you the
work finished, the resource tells you what it finished as.
7. Describe servers with Terraform or OpenTofu
Everything above is also available as a Terraform provider, fiberax/fiberax: servers,
SSH keys, public addresses, private networks, disks, network cards, the server firewall, backup
policies, and router configuration (access rules, port forwards, WireGuard and OpenVPN), plus data
sources for server types, the hosts of a server type, images and prices.
You need Terraform 1.11 or later, or OpenTofu 1.11 or later. The server's
password (and setup of marketplace images) is a write-only argument, so it
never lands in the plan or the state file, and older versions refuse such arguments with
WriteOnly Attribute Not Allowed. A Windows server cannot be described without a password -
Windows images take no SSH keys - so on an older version you cannot describe one at all. Pin the
minimum in your configuration with required_version = ">= 1.11", as in the example
below.
The provider is in a trial period and is not in the public registry yet. It is served from our
own mirror, and Terraform installs it from there once you tell it where to look. Put this into
~/.terraformrc (on Windows: %APPDATA%\terraform.rc):
provider_installation {
network_mirror {
url = "https://docs.fiberax.com/terraform/mirror/"
include = ["registry.terraform.io/fiberax/*"]
}
direct {
exclude = ["registry.terraform.io/fiberax/*"]
}
}
For OpenTofu the file is ~/.tofurc and the registry name is its own:
provider_installation {
network_mirror {
url = "https://docs.fiberax.com/terraform/mirror/"
include = ["registry.opentofu.org/fiberax/*"]
}
direct {
exclude = ["registry.opentofu.org/fiberax/*"]
}
}
Three things about these lines. The trailing slash in url is required: without
it Terraform does not complain about the file, it says the provider "was not found in any of the search
locations", as if it did not exist. include keeps the mirror to our provider only;
without it every other provider you use would be looked for on our mirror as well. The exclude
under direct is optional, but with it a mirror outage is reported as "not found" instead of
a confusing message from the public registry.
Then reference the provider as usual. The token is the same one as above; the provider reads it
from FIBERAX_TOKEN if you leave token out.
The example below describes a NEW server, not the one from step 5. Terraform manages only
what it created or what you imported: terraform apply on this file creates a second
server with its own public address, billed from its first hour, even if you give it the name of the
first one - the platform does not refuse a repeated name. To put the server from step 5 under
Terraform instead, import it by its identifier (terraform import fiberax_server.web 10871)
and read the plan before you apply: fields the platform does not report back, such as
public_ipv4 and ssh_keys, show up as a change there. Import is described
with each resource in the provider reference.
terraform {
required_version = ">= 1.11"
required_providers {
fiberax = {
source = "fiberax/fiberax"
version = "~> 0.11.0"
}
}
}
provider "fiberax" {}
resource "fiberax_server" "web" {
name = "web-02"
server_type_id = 4
image = "fcf9f69c8630904c1d6d73a821f4e674"
cores = 2
memory_mb = 4096
disk_gb = 40
ssh_keys = [126]
public_ipv4 = { new = true }
}
terraform init should end with a line like Installed fiberax/fiberax v0.11.x
(verified checksum) - the version is whichever the mirror holds for the constraint you wrote. It will also print a yellow warning, Incomplete lock file information for
providers: that is how Terraform behaves with any provider that does not come from the registry,
not a fault of the mirror. It matters only when the lock file is shared between machines with different
operating systems - then record every platform you use once:
terraform providers lock -net-mirror=https://docs.fiberax.com/terraform/mirror/ \
-platform=linux_amd64 -platform=darwin_arm64 -platform=windows_amd64
When the provider reaches the public registry, you delete the provider_installation
block and change nothing else: the source address in your configuration is already the final one.
Every resource and data source, with its fields, examples and import syntax, is in the
provider reference. Tell us about anything that behaves differently
from what you expected - that is what the trial is for.
What terraform destroy does with the public address depends on the form of
public_ipv4 and, since 0.7.0, the provider tells the platform explicitly on every destroy:
new = true- the address goes with the server: destroying or replacing the server releases it (and every other public address on the server at that moment) to the shared pool, where it is not billed any more and cannot be taken back. A replacement releases it first, and the new server takes a free address from the shared pool, which may or may not be the same one - do not rely on keeping it. The plan warns about this when a change in the configuration replaces the server;-replaceandtaintreplace it without that warning.id = ...(usually afiberax_ipresource) orreuse = true- the address stays with the project, billed, until you release it, even whenreusehad to allocate it new. When it destroys the server, the provider names in a warning the addresses that stay, with two exceptions. Addresses named withid = ...(afiberax_ipreference or a literal number) are not listed: you chose them; they stay with the project and are billed until released. Since 0.7.3, an address afiberax_ipof the same configuration manages is not listed either when the server depends on that resource throughdepends_on: destroying the resource releases it. On replacement the new server takes the address named byid. Withreuseit takes the free address with the lowest id in the pools of the new server's type - usually the old one; when another free address has a lower id, or the new type draws from other pools, the server gets that one, and the old address stays with the project, billed.
Changing the form of public_ipv4 on an existing server replaces the server, and the
old server is deleted by its old form: a switch from new = true to id of the
same address, or to reuse = true, would lose the address. The provider refuses such a plan,
and its guide Public addresses and what they cost
gives the two steps that keep it. Provider 0.6.0 and earlier do not tell the platform anything,
so the platform's default applies: destroying or replacing a server with such a version releases ALL its
public addresses, one named by id included. Upgrade to 0.7.0 before you destroy or replace a
server whose address you want to keep.
8. Where to go next
- A server from start to finish - including the clean-up.
The server from step 5 and its public address are billed by the hour until you delete them.
Deleting the server releases the address as well, unless you ask to keep it with
release_ips=false. - The reference - every operation, with the fields each one accepts.
- Error codes - what each refusal means and what to do about it.
- The OpenAPI document - feed it to a generator to get a client library.
Two habits worth forming early
Send an idempotency key on everything that creates or charges. Servers and public addresses cost money; a retry without a key can buy you two of them.
Branch on code, not on text. The title of an error is written for
a human and may be reworded. The code is part of the contract.
Something here not matching what you see? Quote the X-Request-Id of the
call when you write to us - it is how we find it.