用户级模型列表读取(采集制;平台默认池继承):selected 恒数组(有档原样回读不清洗;user 键无档 = 未自定义 → 动态继承平台默认池现值[池序],inherited:true,空池 = [] 即既有空集语义;org 键无档恒 [] + inherited:false)+ available(可添加全集 = 本 owner 视角可服务的 platform 目录,与 bundle 可服务性谓词同源,条目含 kind/family/tags 三级过滤维度;自定义端点/BYOK 不在册不受约束;带 x-tansr-org 头 = org 选择集,成员可读)
GET
/v1/model-selection
const url = 'https://api.tansr.com/v1/model-selection';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://api.tansr.com/v1/model-selection \ --header 'Authorization: Bearer <token>'Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Header Parameters
Section titled “Header Parameters”x-tansr-org
string
Org 作用域声明(org 公开 id);服务端校验成员资格与角色,非成员恒 404、角色不够 403
Responses
Section titled “Responses”选择集与可添加全集
Media typeapplication/json
object
selected
required
采集制:恒数组;有档原样回读不清洗(下架/掉价条目由可服务性谓词自然挡)。067 起 user 键无档 = 未自定义 → 动态继承平台默认池现值(池序;空池 = [] 即既有空集语义)
Array<string>
inherited
required
继承态(067 新用户默认池):true = 本 owner 无选购行,selected = 平台默认池现值动态继承(仅 user 键;org 键恒 false);首次显式 PUT(含空数组)即落行脱钩,此后恒 false
boolean
available
required
可添加全集 = 本 owner 视角下可服务的 platform 目录(自定义端点/BYOK 不在册、不受选择集约束)
Array<object>
object
catalogId
required
目录 public id(选择集引用键)
string
handle
required
CLI 侧模型引用名(tansr/
string
displayName
required
string
kind
required
模型形态(三级过滤:类别;available 与 bundle 可服务性谓词同源,现恒 chat)
string
family
required
模型族(三级过滤:厂商;model_catalog.family 结构化列)
string
tags
required
Profile 标签(三级过滤:标签;无 Profile 回 [])
Array<string>
Examplegenerated
{ "selected": [ "example" ], "inherited": true, "available": [ { "catalogId": "example", "handle": "example", "displayName": "example", "kind": "example", "family": "example", "manufacturer": "example", "tags": [ "example" ], "contextWindow": 1, "pricing": { "inPerMillion": "example", "outPerMillion": "example", "cacheReadPerMillion": "example", "cacheWritePerMillion": "example" } } ]}本文是否有帮助?
感谢反馈,我们会持续改进这篇文章。