POST 创建我的私有模板
POST /loom/v1/users/me/templates 创建我的私有模板
所属分组:User Templates · 用户私有模板
Creates a private template container. A runnable version is added separately with canonical_spec.
BASE URL
https://router.shengsuanyun.com/api认证方式
Authorization: Bearer YOUR_API_KEY端点列表
POST/loom/v1/users/me/templatesCreate my private template
Creates a private template container. A runnable version is added separately with canonical_spec.
请求体 · 必填
Create private template request
application/json
| 字段 | 类型 | 说明 |
|---|---|---|
description | string | |
name | string |
{
"description": "string",
"name": "string"
}请求示例
参考地址:https://loomloom.shengsuanyun.com。路径参数与凭据需替换;非 JSON 请求体需按对应格式准备。
curl -X POST 'https://loomloom.shengsuanyun.com/loom/v1/users/me/templates' \
-H 'Authorization: Bearer YOUR_API_KEY' \
-H 'Content-Type: application/json' \
--data '{
"description": "string",
"name": "string"
}'响应
201 Created
application/json
| 字段 | 类型 | 说明 |
|---|---|---|
description | string | |
latestVersionId | string | |
name | string | |
primaryOutputType | string | |
publishedVersionId | string | |
status | string | |
templateId | string | |
updatedAtUnix | integer |
{
"description": "string",
"latestVersionId": "string",
"name": "string",
"primaryOutputType": "string",
"publishedVersionId": "string",
"status": "string",
"templateId": "string",
"updatedAtUnix": 0
}400 Bad Request
application/json
| 字段 | 类型 | 说明 |
|---|---|---|
code | string | |
error | string |
{
"code": "string",
"error": "string"
}401 Unauthorized
application/json
| 字段 | 类型 | 说明 |
|---|---|---|
code | string | |
error | string |
{
"code": "string",
"error": "string"
}500 Internal Server Error
application/json
| 字段 | 类型 | 说明 |
|---|---|---|
code | string | |
error | string |
{
"code": "string",
"error": "string"
}