POST
/
gpu-instance
/
openapi
/
v1
/
endpoint
/
create
curl --request POST \
  --url https://api.ppinfra.com/gpu-instance/openapi/v1/endpoint/create \
  --header 'Authorization: <authorization>' \
  --header 'Content-Type: <content-type>' \
  --data '{
  "endpoint": {
    "name": "<string>",
    "appName": "<string>",
    "workerConfig": [
      {
        "minNum": 123,
        "maxNum": 123,
        "freeTimeout": 123,
        "maxConcurrent": 123,
        "gpuNum": 123
      }
    ],
    "ports": [
      {
        "port": "<string>"
      }
    ],
    "policy": [
      {
        "type": "<string>",
        "value": 123
      }
    ],
    "image": [
      {
        "image": "<string>",
        "authId": "<string>",
        "command": "<string>"
      }
    ],
    "products": [
      {
        "id": "<string>"
      }
    ],
    "rootfsSize": 123,
    "volumeMounts": [
      {
        "type": "<string>",
        "size": 123,
        "id": "<string>",
        "mountPath": "<string>"
      }
    ],
    "clusterID": "<string>",
    "envs": [
      {
        "key": "<string>",
        "value": "<string>"
      }
    ],
    "healthy": {
      "path": "<string>"
    }
  }
}'
{
  "id": "<string>"
}

请求头

Content-Type
string
required

枚举值:application/json。

Authorization
string
required

Bearer 身份验证格式,例如:Bearer {{API 密钥}}。

请求体

endpoint
object
required

Endpoint 配置信息。

响应参数

id
string

创建的 Endpoint ID。