Create instance
Create a new compute instance using existing cloud resources.
Endpoint
POST /v1/instancesRequest body
{
"name": "web-production-01",
"image_id": "IMAGE_ID_FROM_IMAGES",
"flavor_id": "FLAVOR_ID_FROM_FLAVORS",
"network_id": "NETWORK_ID_FROM_NETWORKS",
"keypair_name": "KEYPAIR_NAME",
"security_group_ids": ["SECURITY_GROUP_ID"],
"security_group_names": ["default"],
"volume": {
"name": "additional-vol",
"size": 10
},
"port": "3000",
"dname": "my-instance-site",
"user_data": "#cloud-config\npackages:\n - nginx",
"imageName": "Ubuntu 24.04"
}Required fields
| Field | Type | Description |
|---|---|---|
| name | string | Instance name |
| image_id | string | Image ID used to boot the instance |
| flavor_id | string | Flavor ID or name |
| network_id | string | Private network ID |
| keypair_name | string | SSH keypair name |
Optional fields
| Field | Type | Description |
|---|---|---|
| security_group_ids | string[] | Security group IDs. If omitted, the default security group is used |
| security_group_names | string[] | Security group names. If omitted, the default security group is used |
| volume | object | Creates and attaches a volume (name, size in GB) |
| port | string | Application port. Defaults to "3000" |
| dname | string | Custom subdomain prefix without .redu.cloud |
| user_data | string | Cloud-init or shell script for first boot |
| imageName | string | Optional display name for UI |
Field sources
| Field | Where to get it |
|---|---|
| image_id | List Images |
| flavor_id | Flavors |
| network_id | List Networks |
| security_group_ids | Security Groups |
| keypair_name | SSH Keypairs |
Example
cURL
curl https://api.redu.cloud/v1/instances \
-X POST \
-H "x-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "test-instance-01",
"image_id": "2f9aee80-2584-4a0c-84ea-23c8d1ae93c9",
"flavor_id": "m1.small",
"network_id": "02cb27f9-b120-43ac-8f5c-fd1540a67121",
"security_group_ids": ["fb4da13a-be96-4649-8635-d464b8dfa6d3"],
"keypair_name": "keynt",
"port": "3000"
}'Successful response
{
"id": "e89e9424-3382-44b8-b75d-a3206f03f80d",
"name": "web-production-01",
"status": "building",
"image_id": "ffe84dc7-2496-42fc-8837-1189069ed0fb",
"flavor_id": "1",
"network_id": "81db9cf8-6368-4063-9fa4-3ca8eb9ea1c9",
"created_at": "2026-04-28T13:08:00Z"
}Notes
- Instance creation is asynchronous
- Instances start in the
buildingstate - If no security groups are provided, the default security group is used
- If
portis omitted,3000is used - If
dnameis omitted, it is generated automatically - Use List Instances to check status
Errors
400 Bad Request
{
"error": {
"code": "bad_request",
"message": "Missing required field: image_id"
}
}401 Unauthorized
{
"error": {
"code": "unauthorized",
"message": "Invalid API key"
}
}403 Forbidden
The API key does not have access to the requested resource.
Last updated on