@@ -369,16 +369,6 @@ def get_uf_square_model_detail(
369369 - **WebSearch** (bool) - 是否支持联网搜索
370370
371371
372- **Pricing**
373- - **Completion** (float) - 输出定价
374- - **Currency** (str) - 币种
375- - **Image** (float) - 生图定价
376- - **Prompt** (float) - 提示词定价
377- - **Unit** (str) - 单位(中文),如“次” “百万”
378- - **UnitEn** (str) - 单位(English),如“Time” “Million”
379- - **Video** (str) - 生视频定价
380-
381-
382372 **ModelTypeMap**
383373 - **ImageToImage** (bool) - 图生图模型
384374 - **ImageToVideo** (bool) - 图生视频模型
@@ -389,6 +379,13 @@ def get_uf_square_model_detail(
389379 - **TextToVideo** (bool) - 文生视频模型
390380
391381
382+ **ApiProtocols**
383+ - **Anthropic** (bool) - 是否支持Anthropic协议
384+ - **ChatCompletions** (bool) - 是否支持chat协议
385+ - **Gemini** (bool) - 是否支持gemini协议
386+ - **Responses** (bool) - 是否支持responses协议
387+
388+
392389 **PriceRate**
393390 - **ChargeItem** (str) - 收费项:input/output/thinking/tool...
394391 - **ChargeItemDescription** (str) - 收费项描述
@@ -399,13 +396,14 @@ def get_uf_square_model_detail(
399396 - **UnitEn** (str) - 计价单位英文
400397
401398
402- **InferenceRegionInfo**
403- - **ModelId** (str) - 地域模型ID (例如: deepseek-v4-flash-sg)
404- - **RegionCode** (str) - 地域代码: sg(新加坡)/us(美国)/hk(香港)
405- - **RegionName** (str) - 地域名称: 新加坡/美国/香港
406- - **RegionNameEn** (str) - 地域名称(英文): Singapore/United States/Hong Kong
407- - **SquareModelId** (str) - 广场模型ID (umodel-xxx)
408- - **Status** (str) - 状态: published(已发布)/unpublished(未发布)
399+ **Pricing**
400+ - **Completion** (float) - 输出定价
401+ - **Currency** (str) - 币种
402+ - **Image** (float) - 生图定价
403+ - **Prompt** (float) - 提示词定价
404+ - **Unit** (str) - 单位(中文),如“次” “百万”
405+ - **UnitEn** (str) - 单位(English),如“Time” “Million”
406+ - **Video** (str) - 生视频定价
409407
410408
411409 **PriceTier**
@@ -415,11 +413,13 @@ def get_uf_square_model_detail(
415413 - **Rates** (list) - 见 **PriceRate** 模型定义
416414
417415
418- **ApiProtocols**
419- - **Anthropic** (bool) - 是否支持Anthropic协议
420- - **ChatCompletions** (bool) - 是否支持chat协议
421- - **Gemini** (bool) - 是否支持gemini协议
422- - **Responses** (bool) - 是否支持responses协议
416+ **InferenceRegionInfo**
417+ - **ModelId** (str) - 地域模型ID (例如: deepseek-v4-flash-sg)
418+ - **RegionCode** (str) - 地域代码: sg(新加坡)/us(美国)/hk(香港)
419+ - **RegionName** (str) - 地域名称: 新加坡/美国/香港
420+ - **RegionNameEn** (str) - 地域名称(英文): Singapore/United States/Hong Kong
421+ - **SquareModelId** (str) - 广场模型ID (umodel-xxx)
422+ - **Status** (str) - 状态: published(已发布)/unpublished(未发布)
423423
424424
425425 **SquareModel**
@@ -842,16 +842,6 @@ def list_uf_square_model(
842842
843843 **Response Model**
844844
845- **PriceRate**
846- - **ChargeItem** (str) - 收费项:input/output/thinking/tool...
847- - **ChargeItemDescription** (str) - 收费项描述
848- - **ChargeItemDescriptionEn** (str) - 收费项描述英文描述
849- - **Currency** (str) - 货币单位
850- - **Price** (str) - 价格
851- - **Unit** (str) - 计价单位
852- - **UnitEn** (str) - 计价单位英文
853-
854-
855845 **Pricing**
856846 - **Completion** (float) - 输出定价
857847 - **Currency** (str) - 币种
@@ -862,6 +852,16 @@ def list_uf_square_model(
862852 - **Video** (str) - 生视频定价
863853
864854
855+ **PriceRate**
856+ - **ChargeItem** (str) - 收费项:input/output/thinking/tool...
857+ - **ChargeItemDescription** (str) - 收费项描述
858+ - **ChargeItemDescriptionEn** (str) - 收费项描述英文描述
859+ - **Currency** (str) - 货币单位
860+ - **Price** (str) - 价格
861+ - **Unit** (str) - 计价单位
862+ - **UnitEn** (str) - 计价单位英文
863+
864+
865865 **PriceTier**
866866 - **Condition** (str) - 档位/条件(例如 "32k"、"128k")
867867 - **Description** (str) - 档位描述(例如 "标准上下文 32k")
@@ -949,19 +949,80 @@ def list_uf_square_model_filters_auth(
949949 def list_um_infer_api_key (
950950 self , req : typing .Optional [dict ] = None , ** kwargs
951951 ) -> dict :
952- """ListUMInferAPIKey - 列表查询apikey
952+ """ListUMInferAPIKey -
953+
954+ **Request**
955+
956+ - **ProjectId** (str) - (Config)
957+ - **Limit** (int) -
958+ - **ModelverseDisabled** (int) -
959+ - **Offset** (int) -
960+ - **SandBoxDisabled** (int) -
961+
962+ **Response**
963+
964+ - **Data** (list) - 见 **APIKey** 模型定义
965+
966+ **Response Model**
967+
968+ **APIKey**
969+ - **ChannelId** (int) -
970+ - **CreateTime** (int) -
971+ - **DailyLimitAmount** (str) -
972+ - **DailyUsedAmount** (str) -
973+ - **ExpireTime** (int) -
974+ - **GrantAllModels** (bool) -
975+ - **GrantedModels** (list) -
976+ - **IPWhitelist** (str) -
977+ - **Key** (str) -
978+ - **KeyId** (str) -
979+ - **ModelverseDisabled** (int) -
980+ - **MonthlyLimitAmount** (str) -
981+ - **MonthlyUsedAmount** (str) -
982+ - **Name** (str) -
983+ - **OrganizationId** (int) -
984+ - **SandBoxDisabled** (int) -
985+ - **Status** (int) -
986+ - **TopOrganizationId** (int) -
987+
988+
989+ """
990+ # build request
991+ d = {
992+ "ProjectId" : self .config .project_id ,
993+ }
994+ req and d .update (req )
995+ d = apis .ListUMInferAPIKeyRequestSchema ().dumps (d )
996+
997+ # build options
998+ kwargs ["max_retries" ] = 0 # ignore retry when api is not idempotent
999+
1000+ resp = self .invoke ("ListUMInferAPIKey" , d , ** kwargs )
1001+ return apis .ListUMInferAPIKeyResponseSchema ().loads (resp )
1002+
1003+ def list_um_infer_api_key_v2 (
1004+ self , req : typing .Optional [dict ] = None , ** kwargs
1005+ ) -> dict :
1006+ """ListUMInferAPIKeyV2 - 获取modelverse apikey,密钥掩码返回
9531007
9541008 **Request**
9551009
9561010 - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
957- - **Limit** (int) - 返回数据长度,默认为20,最大100
958- - **ModelverseDisabled** (int) - 是否modelverse可用 0: 启用 1: 禁用
959- - **Offset** (int) - 列表起始位置偏移量,默认为0
960- - **SandBoxDisabled** (int) - 是否沙盒可用 0: 启用 1: 禁用(astraflow 沙盒控制未上线,暂时无效)
1011+ - **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
1012+ - **Zone** (str) - (Required) 可用区。参见 `可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
1013+ - **AllStatus** (int) - 默认 false,排除已删除记录;true 包含已删除记录
1014+ - **KeyId** (str) - 按 API Key 资源 ID 精确过滤;为空不限制
1015+ - **Limit** (int) - 每页条数;0 表示不限制条数
1016+ - **Offset** (str) - 从 0 开始的页号,默认 0;不是记录偏移量
1017+ - **SandBoxDisabled** (str) - 不传不限制;0 启用,1 禁用
1018+ - **SortByCreateTimeAsc** (bool) - true 按创建时间升序,false 降序
1019+ - **SortByUpdateTimeAsc** (bool) - true 按更新时间升序,false 降序;优先于创建时间排序
9611020
9621021 **Response**
9631022
9641023 - **Data** (list) - 见 **APIKey** 模型定义
1024+ - **Timestamp** (int) - 时间戳
1025+ - **TotalCount** (int) - 数据量
9651026
9661027 **Response Model**
9671028
@@ -970,12 +1031,15 @@ def list_um_infer_api_key(
9701031 - **CreateTime** (int) - 创建时间
9711032 - **DailyLimitAmount** (str) - 日限额,单位随用户所在渠道。126渠道单位为美元
9721033 - **DailyUsedAmount** (str) - 日已使用额,单位随用户所在渠道。126渠道单位为美元
1034+ - **DeniedModels** (list) - 禁止访问的模型列表。当 ModelAccessMode=blacklist 时生效。
9731035 - **ExpireTime** (int) - 过期时间的unix时间戳,-1 用不过期
9741036 - **GrantAllModels** (bool) - 全部模型访问开关,开启不受 GrantedModels 参数控制,关闭只能访问 GrantedModels 中添加模型
9751037 - **GrantedModels** (list) - 授权的模型,英文逗号分隔,all表示所有模型都有权限
9761038 - **IPWhitelist** (str) - ip白名单,换行分割的多组ip。支持IPv4和网段,输入后回车生效,最多100个, 示例: 192.168.1.1 192.168.1.10-192.168.1.100 192.168.1.10/24
977- - **Key** (str) - 密钥值
1039+ - **InferenceLogEnabled** (int) - 是否开启推理日志
1040+ - **Key** (str) - 密钥值,前四后四,中间*掩码展示
9781041 - **KeyId** (str) - 资源ID
1042+ - **ModelAccessMode** (str) - 模型访问策略。可选值:whitelist(白名单模式,默认)或 blacklist(黑名单模式)。
9791043 - **ModelverseDisabled** (int) - 是否modelverse可用 0: 启用 1: 禁用
9801044 - **MonthlyLimitAmount** (str) - 月限额,单位随用户所在渠道。126渠道单位为美元
9811045 - **MonthlyUsedAmount** (str) - 月已使用额,单位随用户所在渠道。126渠道单位为美元
@@ -990,12 +1054,13 @@ def list_um_infer_api_key(
9901054 # build request
9911055 d = {
9921056 "ProjectId" : self .config .project_id ,
1057+ "Region" : self .config .region ,
9931058 }
9941059 req and d .update (req )
995- d = apis .ListUMInferAPIKeyRequestSchema ().dumps (d )
1060+ d = apis .ListUMInferAPIKeyV2RequestSchema ().dumps (d )
9961061
997- resp = self .invoke ("ListUMInferAPIKey " , d , ** kwargs )
998- return apis .ListUMInferAPIKeyResponseSchema ().loads (resp )
1062+ resp = self .invoke ("ListUMInferAPIKeyV2 " , d , ** kwargs )
1063+ return apis .ListUMInferAPIKeyV2ResponseSchema ().loads (resp )
9991064
10001065 def list_um_infer_request_logs (
10011066 self , req : typing .Optional [dict ] = None , ** kwargs
@@ -1021,6 +1086,11 @@ def list_um_infer_request_logs(
10211086
10221087 **Response Model**
10231088
1089+ **RequestLogSummary**
1090+ - **FailedRequests** (int) - 查询条件命中的失败请求数
1091+ - **TotalRequests** (int) - 查询条件命中的总请求数
1092+
1093+
10241094 **RequestLogItem**
10251095 - **ApiKeyId** (str) - API Key ID
10261096 - **ApiKeyName** (str) - API Key 名称
@@ -1045,11 +1115,6 @@ def list_um_infer_request_logs(
10451115 - **TotalTokens** (int) - 总 Token 数
10461116
10471117
1048- **RequestLogSummary**
1049- - **FailedRequests** (int) - 查询条件命中的失败请求数
1050- - **TotalRequests** (int) - 查询条件命中的总请求数
1051-
1052-
10531118 **ListUMInferRequestLogsData**
10541119 - **Items** (list) - 见 **RequestLogItem** 模型定义
10551120 - **Summary** (dict) - 见 **RequestLogSummary** 模型定义
0 commit comments