---
title: "创建提供商"
method: POST
path: "/admin/provider"
tags: ["提供商管理"]
---

# 创建提供商

`POST /admin/provider`

管理员创建新的虚拟化提供商配置

## Request body

- AdminCreateProviderRequest
  - `allowClaim` boolean
  - `allowConcurrentTasks` boolean — 是否允许并发任务，默认false
  - `architecture` string
  - `city` string
  - `config` string
  - `container_enabled` boolean
  - `country` string
  - `countryCode` string
  - `defaultInboundBandwidth` integer — 带宽配置
  - `defaultOutboundBandwidth` integer — 默认出站带宽限制（Mbps）
  - `defaultPortCount` integer — 端口映射配置
  - `enableTaskPolling` boolean — 是否启用任务轮询，默认true
  - `endpoint` string
  - `executionRule` 'auto' | 'api_only' | 'ssh_only' — 操作执行配置
  - `expiresAt` string — 过期时间，格式: "2006-01-02 15:04:05"
  - `levelLimits` object — 节点级别的等级限制配置 用于限制该节点上不同等级用户能创建的最大资源
  - `maxConcurrentTasks` integer — 最大并发任务数，默认1
  - `maxContainerInstances` integer — 最大容器数量限制
  - `maxInboundBandwidth` integer — 最大入站带宽限制（Mbps）
  - `maxOutboundBandwidth` integer — 最大出站带宽限制（Mbps）
  - `maxTraffic` integer — 流量管理
  - `maxVMInstances` integer — 最大虚拟机数量限制
  - `name` string, required
  - `networkType` 'nat_ipv4' | 'nat_ipv4_ipv6' | 'dedicated_ipv4' | 'dedicated_ipv4_ipv6' | 'ipv6_only' — 网络配置类型：nat_ipv4, nat_ipv4_ipv6, dedicated_ipv4, dedicated_ipv4_ipv6, ipv6_only
  - `password` string
  - `portRangeEnd` integer — 端口映射范围结束，默认65535
  - `portRangeStart` integer — 端口映射范围起始，默认10000
  - `region` string
  - `sshConnectTimeout` integer — SSH连接配置
  - `sshExecuteTimeout` integer — SSH命令执行超时时间（秒），默认300秒
  - `sshPort` integer
  - `status` string
  - `storagePool` string — 存储配置（ProxmoxVE专用）
  - `taskPollInterval` integer — 任务轮询间隔（秒），默认60秒
  - `token` string
  - `totalQuota` integer
  - `type` string, required
  - `username` string
  - `vm_enabled` boolean

## Response `200`

创建成功

- CommonResponse
  - `code` integer
  - `data` unknown
  - `msg` string

## Other responses

- `400` — 请求参数错误
- `500` — 服务器内部错误

## Changes

- **2025-10-22** `dcdf027169a3` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/oneclickvirt/apis/oneclickvirt-api/changes/admin/provider/post.md)

---

[API](https://skmtc.dev/oneclickvirt/apis/oneclickvirt-api.md) · [All operations](https://skmtc.dev/oneclickvirt/apis/oneclickvirt-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/oneclickvirt/oneclickvirt-api/revisions/dcdf027169a3/schema)
