Skip to main content
POST
/
v1
/
compute
/
configs
Create a compute config
curl --request POST \
  --url https://api.cnap.tech/v1/compute/configs \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>",
  "provider": "hcloud",
  "region": "<string>",
  "image": "<string>",
  "machine_type_filter": "<string>",
  "cloud_credential_id": "<string>"
}
'
{
  "id": "<string>"
}

Authorizations

Authorization
string
header
required

Personal Access Token (cnap_pat_...) or OAuth2 JWT. Create tokens at https://cnap.tech/account/tokens

Body

application/json
name
string
required
Required string length: 1 - 100
provider
enum<string>
required
Available options:
hcloud
region
string
required
Minimum string length: 1
image
string
required
Minimum string length: 1
machine_type_filter
string

Glob pattern to filter available instance types (e.g., "cx*" for shared CPU, "cpx*" for dedicated)

cloud_credential_id
string

Cloud credential ID for BYOM (bring your own machine). Omit to use CNAP-managed defaults.

Response

Config created

id
string
required