Answers which server a free choice of vCPU and memory gets in one location of Aitronos servers: the cheapest server that can be ordered there with at least that many vCPUs and at least that much memory, with its price and the strings to show. A provider sells fixed server types only, so 16 vCPU with 192 GB is a 48 vCPU · 192 GB server, and the note says so.
Get offering options already answers every pair of its cpu_choices and memory_choices in resolutions; use this for any other pair (16 vCPU and 200 GB as readily as 16 and 64). When no server in the location has both, machine_type_id is null, note names the largest server there, and alternatives lists the other locations where the choice fits. The answer is never a refusal for that.
To create the server, send the answer's machine_type_id (or the same vcpu and memory_gb) to Create a server, with machine_type.prices[0].hourly, currency and catalog_version as the quote.
It acts for a person: it requires a bearer token whose user holds the use_forge capability in the acting organization, and Forge cloud compute switched on for the organization. Free sizing is offered for Aitronos servers only.
offering_id string required
aitronos. A bring-your-own offering is refused: order one of its sizes instead.
organization_id string optional
The organization to act in. Defaults to your current organization. You must be an active member of it, or the request is refused with 403 ORGANIZATION_ACCESS_DENIED.
X-Organization-Id string optional
The same as organization_id, as a header. When both are sent, the query parameter wins.
location_id string required
A location id from the options, e.g. eu-central.
vcpu integer required
The vCPUs wanted, 1 to 4096.
memory_gb integer required
The memory wanted in GB, 1 to 65536.
Unknown fields are refused.
catalog_version string — send it back inside the quote of the create.
currency string — CHF.
location_id, vcpu, memory_gb — the choice, as asked.
machine_type_id string or null — the server to create, as a machine_types id of the options (a size's id, e.g. std-16, when a size has exactly that vCPU and memory); null when no server in the location has both.
note string or null — a sentence to show: why a larger server was chosen ("No server in Germany has exactly 16 vCPU and 192 GB, so this is the cheapest one with at least that much."), or the largest server there when none fits ("The largest server in Germany has 48 vCPU and 192 GB."); null for an exact match.
machine_type object or null — the chosen server in the shape of an options sizes entry, priced in this location only: prices[0] carries hourly, monthly_cap, summary, option_label, button_label and can_create.
alternatives array — only when nothing fits here: the other locations where the choice fits, each {location_id, size_id, hourly, currency}; empty otherwise.
| Status | Code | When |
|---|---|---|
| 401 | AUTHENTICATION_REQUIRED | No credential, or a credential with no user (an organization API key). |
| 403 | ORGANIZATION_ACCESS_DENIED | organization_id or X-Organization-Id names an organization you are not an active member of. |
| 403 | INSUFFICIENT_PERMISSIONS | The user does not hold use_forge in the acting organization. |
| 403 | FORGE_COMPUTE_DISABLED | Forge cloud compute is not switched on for the organization. |
| 403 | FORGE_COMPUTE_OFFERING_BLOCKED | Aitronos servers cannot be used in this environment. |
| 403 | FORGE_COMPUTE_OFFERING_NOT_OFFERED | The offering is not offered to you right now. details.offering_id is its id. |
| 404 | FORGE_COMPUTE_OFFERING_NOT_FOUND | No offering has this id. |
| 422 | INVALID_FIELD_VALUE | location_id is not a location of Aitronos servers (details.field location_id). |
| 422 | VALIDATION_ERROR | A body of the wrong shape, an unknown field, a value out of range, or a bring-your-own offering (details.reason free_sizing_unsupported). |
| 502 | FORGE_COMPUTE_PROVIDER_UNREACHABLE | The servers' prices could not be read. Try again in a moment. |
- Bash
- Python
- Python
- JavaScript
curl -X POST "https://api.aitronos.com/v1/forge/compute/offerings/aitronos/options/resolve" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{"location_id": "eu-central", "vcpu": 16, "memory_gb": 192}'Response:
{
"catalog_version": "fc-3b8e1f0a9c42",
"currency": "CHF",
"location_id": "eu-central",
"vcpu": 16,
"memory_gb": 192,
"machine_type_id": "ded-x86-48c-192g",
"note": "No server in Germany has exactly 16 vCPU and 192 GB, so this is the cheapest one with at least that much.",
"machine_type": {
"id": "ded-x86-48c-192g",
"label": "48 vCPU · 192 GB",
"vcpu": 48,
"memory_gb": 192,
"disk_gb": 960,
"arch": "x86_64",
"dedicated_cpu": true,
"order": 0,
"prices": [
{
"location_id": "eu-central",
"hourly": "2.58",
"monthly_cap": "1607.04",
"includes_vat": false,
"available": true,
"price_verified": true,
"summary": "48 vCPU · 192 GB · Germany",
"option_label": "48 vCPU · 192 GB · CHF 2.58/h",
"button_label": "Create · 48 vCPU · 192 GB · Germany · CHF 2.58/h, at most CHF 1,607.04/month",
"can_create": true
}
]
},
"alternatives": []
}- Forge cloud compute overview
- List billing organizations
- Choose the default billing organization
- List project groups
- Register or update a project group
- Delete a project group
- List compute offerings
- Get offering options
- Resolve a free size
- List connected accounts
- Connect a cloud account
- Disconnect a cloud account
- Create a server
- List servers
- List your servers in every organization
- Get a server
- Get a server's daily cost and uptime
- List a server's running intervals
- List a server's event history
- Report a setup step
- Report the server's host key
- Mark a server ready
- Report activity
- Park a server
- Resume a server
- Delete a server
- Revoke a server
- Get compute settings
- Update compute settings
- Get spend limits
- Change the organization's limits
- Set your own limit
- List member limits
- Set a member's limit
- Delete a leftover resource
- Get pricing sheet