codecamp

OpenAI 获取项目服务层级设置

获取项目服务层级设置

get /organization/projects/{project_id}/service_tier_settings

获取为项目配置的默认服务层级及已启用的服务层级。

路径参数

  • project_id: string

项目 ID。

返回值

  • ProjectServiceTierSettings object { default, enabled_tiers, object }

  • default: "standard" or "fast" or "scale"

对于省略 service_tier 或将其设为 auto 的请求,使用的默认层级。

  • "standard"

  • "fast"

  • "scale"

  • enabled_tiers: "all" or array of ProjectOptionalServiceTier

为项目启用的其他服务层级。"all" 包含未来的层级。空数组仅允许 Standard(标准层级)。组织策略和资格要求仍然适用。

  • "all"

  • "all"

  • array of ProjectOptionalServiceTier

  • "flex"

  • "fast"

  • "ultrafast"

  • object: "project.service_tier_settings" (default: "project.service_tier_settings")

  • "project.service_tier_settings"

示例

## 使用环境变量中的组织管理员密钥获取项目服务层级设置
curl "https://api.openai.com/v1/organization/projects/proj_abc/service_tier_settings" \
  -H "Authorization: Bearer $OPENAI_ADMIN_KEY"

响应示例

{
  "object": "project.service_tier_settings",
  "default": "standard",
  "enabled_tiers": "all"
}
OpenAI 为服务账户创建 API 密钥
OpenAI 更新项目服务层级设置
温馨提示
下载编程狮App,免费阅读超1000+编程语言教程
取消
确定
目录

其他能力与进阶指南

Embeddings 接口参考

审计日志接口参考

项目管理及子资源接口参考

Agents 接口及子资源

Decisions 接口参考

关闭

MIP.setData({ 'pageTheme' : getCookie('pageTheme') || {'day':true, 'night':false}, 'pageFontSize' : getCookie('pageFontSize') || 20 }); MIP.watch('pageTheme', function(newValue){ setCookie('pageTheme', JSON.stringify(newValue)) }); MIP.watch('pageFontSize', function(newValue){ setCookie('pageFontSize', newValue) }); function setCookie(name, value){ var days = 1; var exp = new Date(); exp.setTime(exp.getTime() + days*24*60*60*1000); document.cookie = name + '=' + value + ';expires=' + exp.toUTCString(); } function getCookie(name){ var reg = new RegExp('(^| )' + name + '=([^;]*)(;|$)'); return document.cookie.match(reg) ? JSON.parse(document.cookie.match(reg)[2]) : null; }