# [BETA] Create VM instance

```http
POST /compute/v1/tenants/{tenantId}/instances
```

Base URL: `https://api-portal.aur.lu/api`

Operation ID: `CreateInstance`

Authentication: ApiKeyAuth (API key in header `X-Api-Key`)

Required permission: `create:compute:instances`

Handles the creation of a new virtual machine instance for a specific tenant. If sshKeys are provided, they are associated with the instance.

## Parameters

### Path parameters

- `tenantId` (string, required) — Tenant ID

## Request body (required)

Create instance request

Content type: `application/json`

- `cloudInit` (string)
- `name` (string)
- `networkId` (string)
- `productCode` (string)
- `sshKeys` (array of object)
  - items (object)
    - `name` (string)
- `templateId` (string)

Example request body:

```json
{
  "cloudInit": "string",
  "name": "string",
  "networkId": "string",
  "productCode": "string",
  "sshKeys": [
    {
      "name": "string"
    }
  ],
  "templateId": "string"
}
```

## Responses

### 201 — Created

Content type: `application/json`

- `id` (string)
- `jobId` (string)

### 400 — Bad Request

Content type: `application/json`

- `message` (string)

### 403 — Compute is read-only or suspended for this tenant

Content type: `application/json`

- `message` (string)

### 404 — Not Found

Content type: `application/json`

- `message` (string)
