统一模型接入与用量管理 立即注册
蓝天
原站参考文档

以下为胜算云公开资料。文中的原站账号、地址、定价和专有服务不属于蓝天;蓝天可用模型以当前 sub2api 配置为准。接入蓝天请先查看 快速开始。

查看原文

GET 获取模板创作上下文

GET /loom/v1/templateAuthoringContext 获取模板创作上下文
所属分组:Models · 可执行模型
Returns current Profile contracts and currently eligible models for TemplateSpec v2 authoring.

BASE URLhttps://router.shengsuanyun.com/api
认证方式Authorization: Bearer YOUR_API_KEY

端点列表

← 上一页
查询 LoomLoom 可用模型列表
下一页 →
Creator Earnings · 创作者收益 · 接口汇总

接口参考

以下为原文协议定义与示例,原站地址不代表蓝天已开通对应能力。蓝天接入地址和模型以本地配置为准。

蓝天 API 密钥
GET/loom/v1/templateAuthoringContextGet template authoring context

Returns current Profile contracts and currently eligible models for TemplateSpec v2 authoring.

请求示例

参考地址:https://loomloom.shengsuanyun.com。路径参数与凭据需替换;非 JSON 请求体需按对应格式准备。

curl -X GET 'https://loomloom.shengsuanyun.com/loom/v1/templateAuthoringContext' \
  -H 'Authorization: Bearer YOUR_API_KEY'

响应

200 OK

application/json

字段类型说明
codeExecutionobject
展开结构
字段类型说明
maxSourceBytesinteger
profilesarray
展开结构

array

数组元素
字段类型说明
canonicalHashstring
capabilitystring
compilerstring
defaultModelAvailableboolean
definitionobject
展开结构
字段类型说明
constraintsobject
executionUnitstring
inputsarray
展开结构

array

数组元素
字段类型说明
acceptedMimeTypesarray
展开结构

嵌套结构:array

kindstring
maxItemsinteger
minItemsinteger
portIdstring
requiredboolean
valueTypestring
operationstring
outputsarray
展开结构

array

数组元素
字段类型说明
acceptedMimeTypesarray
展开结构

嵌套结构:array

kindstring
maxItemsinteger
minItemsinteger
portIdstring
requiredboolean
valueTypestring
schemaVersionstring
dynamicboolean
eligibleModelsarray
展开结构

array

数组元素
字段类型说明
authoringOptionsarray
展开结构

array

数组元素

嵌套结构:object

displayNamestring
modelIdstring
supportedStepTypesarray
展开结构

array

数组元素

嵌套结构:string

endpointstring
inputPortsarray
展开结构

array

数组元素
字段类型说明
acceptedMimeTypesarray
展开结构

array

数组元素

嵌套结构:string

kindstring
maxItemsinteger
minItemsinteger
portIdstring
requiredboolean
valueTypestring
operationsobject
展开结构
字段类型说明
defaultModelIdstring
descriptionstring
displayNamestring
recommendedboolean
sortOrderinteger
outputobject
展开结构
字段类型说明
textboolean
usageboolean
profileIdstring
revisionstring
streamboolean
{
  "codeExecution": {
    "maxSourceBytes": 0
  },
  "profiles": [
    {
      "canonicalHash": "string",
      "capability": "string",
      "compiler": "string",
      "defaultModelAvailable": false,
      "definition": {
        "constraints": {},
        "executionUnit": "string",
        "inputs": [
          {
            "acceptedMimeTypes": [
              null
            ],
            "kind": "string",
            "maxItems": 0,
            "minItems": 0,
            "portId": "string",
            "required": false,
            "valueType": "string"
          }
        ],
        "operation": "string",
        "outputs": [
          {
            "acceptedMimeTypes": [
              null
            ],
            "kind": "string",
            "maxItems": 0,
            "minItems": 0,
            "portId": "string",
            "required": false,
            "valueType": "string"
          }
        ],
        "schemaVersion": "string"
      },
      "dynamic": false,
      "eligibleModels": [
        {
          "authoringOptions": [
            {
              "capabilityProfile": null,
              "fixedModelContract": null,
              "kind": null
            }
          ],
          "displayName": "string",
          "modelId": "string",
          "supportedStepTypes": [
            "string"
          ]
        }
      ],
      "endpoint": "string",
      "inputPorts": [
        {
          "acceptedMimeTypes": [
            "string"
          ],
          "kind": "string",
          "maxItems": 0,
          "minItems": 0,
          "portId": "string",
          "required": false,
          "valueType": "string"
        }
      ],
      "operations": {
        "defaultModelId": "string",
        "description": "string",
        "displayName": "string",
        "recommended": false,
        "sortOrder": 0
      },
      "output": {
        "text": false,
        "usage": false
      },
      "profileId": "string",
      "revision": "string",
      "stream": false
    }
  ]
}
401 Unauthorized

application/json

字段类型说明
codestring
errorstring
{
  "code": "string",
  "error": "string"
}
500 Internal Server Error

application/json

字段类型说明
codestring
errorstring
{
  "code": "string",
  "error": "string"
}