> ## Documentation Index
> Fetch the complete documentation index at: https://ppio.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# 创建 CPU 实例

## 请求头

<ParamField header="Content-Type" type="string" required={true}>
  枚举值：application/json。
</ParamField>

<ParamField header="Authorization" type="string" required={true}>
  Bearer 身份验证格式，例如：Bearer \{\{API 密钥}}。
</ParamField>

## 请求体

<ParamField body="name" type="string" required={false}>
  CPU 实例名称。字符串，长度限制：0-255 字符。
</ParamField>

<ParamField body="productId" type="string" required={true}>
  用于部署实例的产品 ID。可以调用[获取 CPU 产品列表接口](/gpus/reference-list-cpu-products)查询。字符串，长度限制：1-255 字符。
</ParamField>

<ParamField body="imageUrl" type="string" required={true}>
  容器镜像地址。字符串，长度限制：1-500 字符。
</ParamField>

<ParamField body="imageAuth" type="string" required={false}>
  镜像仓库认证。格式为 username:password。使用私有镜像时需配置，使用公共镜像或派欧云平台的镜像时，无需配置。字符串，长度限制：0-10239 字符。
</ParamField>

<ParamField body="imageAuthId" type="string" required={false}>
  镜像仓库认证 ID。
</ParamField>

<ParamField body="ports" type="string" required={false}>
  实例对外开放的端口。字符串，示例：80/http, 3306/tcp。支持的端口号范围：1-65535，其中 2222、2223、2224 为内部端口，不可使用。支持的端口类型为 tcp、http。ports + tools 最多使用 15 个端口。
</ParamField>

<ParamField body="envs" type="object[]" required={false}>
  实例环境变量。数组，最多 100 组环境变量。

  <Expandable title="properties" defaultOpen={false}>
    <ParamField body="key" type="string" required={false}>
      环境变量名称。字符串，长度限制：0-511 字符。
    </ParamField>

    <ParamField body="value" type="string" required={false}>
      环境变量取值。字符串，长度限制：0-4095 字符。
    </ParamField>
  </Expandable>
</ParamField>

<ParamField body="tools" type="object[]" required={false}>
  是否开启官方镜像支持工具。数组，目前部分官方镜像仅包含 Jupyter。ports + tools 最多使用 15 个端口。

  <Expandable title="properties" defaultOpen={false}>
    <ParamField body="name" type="string" required={false}>
      工具名称。可选值：Jupyter。
    </ParamField>

    <ParamField body="port" type="string" required={false}>
      工具使用端口，支持的端口号范围：1-65535，其中 2222、2223、2224 为内部端口，不可使用。
    </ParamField>

    <ParamField body="type" type="string" required={false}>
      工具使用端口类型。可选值：tcp、http。
    </ParamField>
  </Expandable>
</ParamField>

<ParamField body="command" type="string" required={false}>
  容器启动命令。该配置会覆盖 Docker 镜像的 CMD。字符串，长度限制：0-2047 字符。
</ParamField>

<ParamField body="entrypoint" type="string" required={false}>
  容器启动 entrypoint。该配置会覆盖 Docker 镜像的 ENTRYPOINT。字符串，长度限制：0-2047 字符。
</ParamField>

<ParamField body="clusterId" type="string" required={false}>
  指定集群 ID 创建实例，填空值则随机在一个集群创建实例。字符串，长度限制：0-255 字符。
</ParamField>

<ParamField body="localStorageMountPoint" type="string" required={false}>
  本地存储的挂载路径。默认值："/workspace"，字符串，长度限制：1-4095 字符。
</ParamField>

<ParamField body="networkStorages" type="object[]" required={false}>
  云存储挂载配置。数组，最多支持挂载 30 个云存储。

  <Expandable title="properties" defaultOpen={false}>
    <ParamField body="Id" type="string" required={false}>
      云存储 ID。
    </ParamField>

    <ParamField body="mountPoint" type="string" required={false}>
      云存储的挂载路径。默认值："/network"，字符串，长度限制：1-4095 字符。
    </ParamField>
  </Expandable>
</ParamField>

<ParamField body="networkId" type="string" required={false}>
  vpc 网络 ID。不使用 vpc 网络则填空值。
</ParamField>

<ParamField body="kind" type="string" required={true}>
  实例类型。可选值：cpu、gpu。取值固定为 cpu。
</ParamField>

## 响应参数

<ResponseField name="id" type="string" required={false}>
  创建的实例 ID。
</ResponseField>
