> For the complete documentation index, see [llms.txt](https://docs.cloudeka.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.cloudeka.ai/cloudeka-api/cloudeka-backend/create-vm.md).

# Create VM

This API is used to create a new VM

```json
{"openapi":"3.1.1","info":{"title":"Cloudeka AI - API Documentation","version":"1.0.0"},"tags":[{"name":"Cloudeka Backend","description":"API endpoints for Cloudeka Backend (base: /core)"}],"servers":[{"url":"https://ai.cloudeka.id/"}],"security":[{"BearerAuth":[]}],"components":{"securitySchemes":{"BearerAuth":{"description":"Type 'Bearer ' followed by your JWT token. Example: \"Bearer eyJhbGciOi...\"","type":"apiKey","name":"Authorization","in":"header"}},"schemas":{"ai_backend__handler.SuccessRespond":{"type":"object","properties":{"code":{"type":"integer"},"data":{},"message":{"type":"string"}}},"ai_backend__handler.BaseError":{"type":"object","properties":{"code":{"type":"string"},"error":{}}},"ai_backend__requests.VMCreateParam":{"type":"object","required":["flavor_id","image_name","name","namespace","organization_id","password","project_id","storage","storage_class","url"],"properties":{"flavor_id":{"description":"Virtual Machine","type":"string"},"gpu":{"description":"GPU","type":"string"},"gpu_amount":{"type":"integer","minimum":0},"image_name":{"type":"string"},"name":{"type":"string","maxLength":30},"namespace":{"type":"string"},"organization_id":{"type":"string"},"password":{"type":"string"},"project_id":{"type":"string"},"storage":{"type":"string"},"storage_class":{"type":"string"},"url":{"description":"Data Volume","type":"string"}}}}},"paths":{"/core/virtual-machine":{"post":{"description":"This API is used to create a new VM","tags":["Cloudeka Backend","VMs"],"summary":"Create VM","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ai_backend__handler.SuccessRespond"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ai_backend__handler.BaseError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ai_backend__requests.VMCreateParam"}}},"description":"Create VM Payload","required":true}}}}}
```
