用途:通过 ibl.ai 平台 API 管理组织账户级集成,包括第三方 LLM 提供商密钥、数据源凭据和 Platform API 令牌。
认证与约定:基础地址 https://api.iblai.app;每个请求需带请求头 Authorization: Api-Token $IBLAI_API_KEY;路径变量 {org} = $IBLAI_ORG,{username} = $IBLAI_USERNAME。尚未连接时先运行 /iblai-api-login 以填充 IBLAI_ORG、IBLAI_USERNAME 和 IBLAI_API_KEY。
读取:LLM 用 GET /dm/api/ai-account/orgs/{org}/masked-llm-credential/ 列出已配置提供商(掩码),用 .../credential/schema/ 查字段结构,用 .../ai-mentor/orgs/{org}/users/{username}/mentor/llms/ 查可用提供商。数据源用 GET .../masked-integration-credential/ 列表,用 .../integration-credential/schema/v2/ 查结构。API 令牌用 GET /dm/api/core/platform/api-tokens/?platform_key={org} 列出。
写入:LLM 提供商通过 POST /dm/api/ai-account/orgs/{org}/credential/ 添加,字段为 name、value、platform;删除用 DELETE 同路径,需带 name、platform,可选 model_name。数据源通过 POST .../integration-credential/ 添加,字段为 name、value、platform;删除用 DELETE。Platform API 令牌通过 POST /dm/api/core/platform/api-tokens/ 创建,DELETE .../api-tokens/{name}?platform_key={org} 吊销。
注意:LLM 与数据源为账户级,作用于整个组织而非单个智能体;列表接口返回掩码凭据,POST 前应先查对应 schema 确认字段;令牌接口与 /iblai-api-token 共用,两处生成的令牌相同;删除操作具破坏性,应先与用户确认。