Create compute instance
Visibility: internal ยท public ( OpenAPI Custom Extension: x-visibility )
"Virtual machine lifecycle", "Baremetal server lifecycle" Create a new VM or baremetal instance.
Authorization
bearerAuth Bearer token authentication using OAuth2/OIDC tokens
In: header
Path Parameters
Region identifier
Project identifier
Request Body
application/json
Name of the resource. Must be 1-63 characters long and match the pattern a-z? โ the first character must be a lowercase letter, and all following characters must be lowercase letters, digits, or hyphens, with the last character being a letter or digit. If not specified, the server will generate a name. Immutable after creation.
^[a-z]([-a-z0-9]*[a-z0-9])?$1 <= length <= 63Optional human-friendly display name for the instance.
An optional description of this resource.
Labels to apply to this resource.
URI of the instance type resource to use for this instance. Immutable after creation.
uriInstance metadata assigned to this instance, exposed via metadata service.
Specifies the hostname of the instance. The specified hostname must be RFC1035 compliant. If not specified, the default hostname will be generated. Immutable after creation.
GPU accelerators to attach to this instance.
Response Body
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://api.k0rdent.ai/v1/regions/string/projects/string/compute/instances" \ -H "Content-Type: application/json" \ -d '{ "type": "/v1/regions/us-texas-1/zones/us1-a/instance-types/g1-xlarge" }'{
"selfLink": "/v1/regions/us-texas-1/projects/project-x9y8z7/compute/instances/instance-d4e5f6",
"uid": "07cc67f4-45d6-494b-adac-09b5cbc7e2b5",
"id": "instance-d4e5f6",
"displayName": "string",
"description": "string",
"labels": {
"property1": "string",
"property2": "string"
},
"type": "/v1/regions/us-texas-1/zones/us1-a/instance-types/g1-xlarge",
"instanceMetadata": [
{
"key": "ssh-keys",
"value": "admin:ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJeaD1heScpzmiypsUSb0T3lkmg2d/onGkPviaZ2Rtgc admin@hostname\nguest:ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBYgtXDI3X7eELjQ+D+qbJGqgfa+OqvY7jo/EuLv1ECd guest@hostname\n"
}
],
"hostname": "string",
"lifecycle": {
"status": "PROVISIONING",
"statusMessage": "string"
},
"disks": [
{
"sizeGb": 0,
"interface": "SCSI",
"source": "/v1/regions/us-texas-1/compute/images/ubuntu-24.04-20260202-3",
"boot": true,
"type": "PERSISTENT",
"mode": "READ_ONLY"
}
],
"nics": [
{
"network": "/v1/regions/us-texas-1/projects/project-x9y8z7/compute/networks/network-g7h8i9",
"subnet": "http://example.com",
"ipv4Address": "string",
"ipv6Address": "string",
"vlan": 0
}
],
"gpus": [
{
"type": "http://example.com",
"count": 0
}
],
"createdAt": "2019-08-24T14:15:22Z",
"updatedAt": "2019-08-24T14:15:22Z"
}{
"error": {
"code": 0,
"message": "string",
"details": [
{}
]
}
}{
"error": {
"code": 0,
"message": "string",
"details": [
{}
]
}
}{
"error": {
"code": 0,
"message": "string",
"details": [
{}
]
}
}{
"error": {
"code": 0,
"message": "string",
"details": [
{}
]
}
}How is this guide?