GPU接口文档
API接口范例

API接口操作范例

调用 OpenAPI 前,请在控制台 账户中心 → API 密钥 创建并保管公钥/私钥(前往 API 密钥 (opens in a new tab))。下文 SDK 示例中的 public_key 均指此处密钥,与 模型 API 服务 → API KEY(模型广场按量 Key)不是同一套凭证。

具体操作请点击链接查看:https://github.com/ucloud/compshare-developer-examples/ (opens in a new tab)

常用 API 速查

场景Action
判断卡型/规格是否有库存CheckCompShareResourceCapacity
按量转包月 / 变更计费SwitchChargeType
实例监控指标GetCompShareInstanceMonitor
查询实例(含 MonitorMessagesDescribeCompShareInstance

Python SDK

https://github.com/ucloud/compshare-developer-examples/tree/main/python-sdk/compshare (opens in a new tab)

Golang SDK

https://github.com/ucloud/compshare-developer-examples/tree/main/golang-sdk/compshare (opens in a new tab)

Java SDK

https://github.com/ucloud/compshare-developer-examples/tree/main/java-sdk/compshare (opens in a new tab)

Copyright © 2026 沪ICP备12020087号-61