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

# Cpu

## Get Cpu Instance Types

> Lists CPU-only instance types.\
> \
> GET /v2/instance-types only returns instance types with a row in the\
> auctions table, which CPU-only types deliberately don't have (adding\
> one would make them spot-biddable). This is the discovery endpoint for\
> the instance\_type FID POST /v2/cpu/instances requires.

```json
{"openapi":"3.1.0","info":{"title":"Mithril","version":"1.0.0"},"servers":[{"url":"https://api.mithril.ai"}],"security":[{"MithrilAPIKey":[]}],"components":{"securitySchemes":{"MithrilAPIKey":{"type":"http","scheme":"bearer","bearerFormat":"fkey_<key>"}},"schemas":{"InstanceTypeModel":{"properties":{"fid":{"type":"string","title":"Fid"},"name":{"type":"string","title":"Name"},"num_cpus":{"type":"integer","title":"Num Cpus"},"cpu_type":{"type":"string","title":"Cpu Type"},"ram_gb":{"type":"integer","title":"Ram Gb"},"num_gpus":{"type":"integer","title":"Num Gpus"},"gpu_type":{"type":"string","title":"Gpu Type"},"gpu_memory_gb":{"type":"integer","title":"Gpu Memory Gb"},"gpu_socket":{"type":"string","title":"Gpu Socket"},"local_storage_gb":{"type":"integer","title":"Local Storage Gb"},"network_type":{"type":"string","nullable":true},"ib_count":{"type":"integer","title":"Ib Count"},"bridge_count":{"type":"integer","title":"Bridge Count"},"hourly_price":{"type":"number","title":"Hourly Price"}},"type":"object","required":["fid","name","num_cpus","cpu_type","ram_gb","num_gpus","gpu_type","gpu_memory_gb","gpu_socket","local_storage_gb","ib_count","bridge_count","hourly_price"],"title":"InstanceTypeModel"}}},"paths":{"/v2/cpu/instance-types":{"get":{"tags":["cpu"],"summary":"Get Cpu Instance Types","description":"Lists CPU-only instance types.\n\nGET /v2/instance-types only returns instance types with a row in the\nauctions table, which CPU-only types deliberately don't have (adding\none would make them spot-biddable). This is the discovery endpoint for\nthe instance_type FID POST /v2/cpu/instances requires.","operationId":"get_cpu_instance_types_v2_cpu_instance_types_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/InstanceTypeModel"},"type":"array","title":"Response Get Cpu Instance Types V2 Cpu Instance Types Get"}}}}}}}}}
```

## Get Cpu Regions

> Lists regions where CPU VMs are available (CPU\_VMS\_ENABLED on).\
> \
> Discovery endpoint for the region POST /v2/cpu/instances requires - the\
> console offers only these, so a user never picks a region the create\
> would reject. Empty when no cluster is opted in.

```json
{"openapi":"3.1.0","info":{"title":"Mithril","version":"1.0.0"},"servers":[{"url":"https://api.mithril.ai"}],"security":[{"MithrilAPIKey":[]}],"components":{"securitySchemes":{"MithrilAPIKey":{"type":"http","scheme":"bearer","bearerFormat":"fkey_<key>"}},"schemas":{"RegionDTO":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"block_storage_enabled":{"type":"boolean","title":"Block Storage Enabled"},"fileshare_storage_enabled":{"type":"boolean","title":"Fileshare Storage Enabled"},"k8s_enabled":{"type":"boolean","title":"K8S Enabled"},"max_volume_size_tb":{"type":"integer","title":"Max Volume Size Tb","default":32},"max_volume_name_length":{"type":"integer","title":"Max Volume Name Length","default":64}},"type":"object","required":["id","name","block_storage_enabled","fileshare_storage_enabled","k8s_enabled"],"title":"RegionDTO"}}},"paths":{"/v2/cpu/regions":{"get":{"tags":["cpu"],"summary":"Get Cpu Regions","description":"Lists regions where CPU VMs are available (CPU_VMS_ENABLED on).\n\nDiscovery endpoint for the region POST /v2/cpu/instances requires - the\nconsole offers only these, so a user never picks a region the create\nwould reject. Empty when no cluster is opted in.","operationId":"get_cpu_regions_v2_cpu_regions_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/RegionDTO"},"type":"array","title":"Response Get Cpu Regions V2 Cpu Regions Get"}}}}}}}}}
```

## Create Cpu Instance

> Creates and instantly launches a self-serve CPU-only instance.\
> \
> Unlike GPU reservations/spot bids, this is synchronous: the instance is\
> launched in the same request, with no bid price and no auction\
> involvement.

```json
{"openapi":"3.1.0","info":{"title":"Mithril","version":"1.0.0"},"servers":[{"url":"https://api.mithril.ai"}],"security":[{"MithrilAPIKey":[]}],"components":{"securitySchemes":{"MithrilAPIKey":{"type":"http","scheme":"bearer","bearerFormat":"fkey_<key>"}},"schemas":{"CreateCpuInstanceRequest":{"properties":{"name":{"type":"string","title":"Name"},"project":{"type":"string","title":"Project"},"instance_type":{"type":"string","title":"Instance Type"},"region":{"type":"string","title":"Region"},"volumes":{"items":{"type":"string"},"type":"array","title":"Volumes","default":[]},"ssh_keys":{"items":{"type":"string"},"type":"array","nullable":true},"image_version":{"type":"string","nullable":true}},"additionalProperties":false,"type":"object","required":["name","project","instance_type","region"],"title":"CreateCpuInstanceRequest"},"InstanceModel":{"properties":{"fid":{"type":"string","title":"Fid"},"name":{"type":"string","title":"Name"},"project":{"type":"string","title":"Project"},"created_at":{"type":"string","format":"datetime","title":"Created At"},"created_by":{"type":"string","title":"Created By"},"instance_type":{"type":"string","title":"Instance Type"},"region":{"type":"string","nullable":true},"bid":{"type":"string","nullable":true},"reservation":{"type":"string","nullable":true},"ssh_destination":{"type":"string","nullable":true},"private_ip":{"type":"string","nullable":true},"status":{"type":"string","enum":["STATUS_NEW","STATUS_CONFIRMED","STATUS_INITIALIZING","STATUS_STARTING","STATUS_RUNNING","STATUS_STOPPING","STATUS_TERMINATED","STATUS_RELOCATING","STATUS_PREEMPTING","STATUS_PREEMPTED","STATUS_REPLACED","STATUS_PAUSED","STATUS_ERROR"],"title":"Status"}},"type":"object","required":["fid","name","project","created_at","created_by","instance_type","status"],"title":"InstanceModel"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"oneOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}},"paths":{"/v2/cpu/instances":{"post":{"tags":["cpu"],"summary":"Create Cpu Instance","description":"Creates and instantly launches a self-serve CPU-only instance.\n\nUnlike GPU reservations/spot bids, this is synchronous: the instance is\nlaunched in the same request, with no bid price and no auction\ninvolvement.","operationId":"create_cpu_instance_v2_cpu_instances_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateCpuInstanceRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InstanceModel"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}}}
```

## Terminate Cpu Instance

> Terminates a CPU-only instance.\
> \
> Stops the underlying VM, closes the backing order/allocation, and\
> soft-deletes the managed customer cluster.

```json
{"openapi":"3.1.0","info":{"title":"Mithril","version":"1.0.0"},"servers":[{"url":"https://api.mithril.ai"}],"security":[{"MithrilAPIKey":[]}],"components":{"securitySchemes":{"MithrilAPIKey":{"type":"http","scheme":"bearer","bearerFormat":"fkey_<key>"}},"schemas":{"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"oneOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}},"paths":{"/v2/cpu/instances/{instance_fid}":{"delete":{"tags":["cpu"],"summary":"Terminate Cpu Instance","description":"Terminates a CPU-only instance.\n\nStops the underlying VM, closes the backing order/allocation, and\nsoft-deletes the managed customer cluster.","operationId":"terminate_cpu_instance_v2_cpu_instances__instance_fid__delete","parameters":[{"name":"instance_fid","in":"path","required":true,"schema":{"type":"string","title":"Instance Fid"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.mithril.ai/compute-api/compute-api-reference/cpu.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
