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

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

查看原文

POST 流式上传输入素材

POST /loom/v1/inputAssets:uploadStream
所属分组:Input Assets · 输入资产
Raw bytes. Video ≤200 MiB; others ≤10 MiB. X-Filename is a percent-encoded UTF-8 filename. Content-Length is required. Optional SHA-256 must be lowercase hex. Same user/client request ID replays require identical bytes and metadata; 7-day asset lifetime. Old JSON upload stays at 10 MiB.

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

端点列表

← 上一页
上传输入资产
下一页 →
上传编排输入

接口参考

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

蓝天 API 密钥
POST/loom/v1/inputAssets:uploadStream流式上传输入素材

Raw bytes. Video ≤200 MiB; others ≤10 MiB. X-Filename is a percent-encoded UTF-8 filename. Content-Length is required. Optional SHA-256 must be lowercase hex. Same user/client request ID replays require identical bytes and metadata; 7-day asset lifetime. Old JSON upload stays at 10 MiB.

请求参数

参数位置 / 类型说明
X-Filename必填header / anyPercent-encoded UTF-8 filename
Content-Type必填header / anyActual file MIME, e.g. video/mp4
Content-Length必填header / anyExact byte count
X-Content-SHA256header / any64 lowercase hexadecimal characters
X-Client-Request-Idheader / anyOwner-scoped idempotency key, max 128 bytes

请求体 · 必填

Raw file bytes (no JSON/base64)

*/*

string

"string"

请求示例

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

curl -X POST 'https://loomloom.shengsuanyun.com/loom/v1/inputAssets:uploadStream' \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -H 'Content-Type: VALUE' \
  -H 'X-Filename: VALUE' \
  -H 'Content-Length: VALUE' \
  --data 'REQUEST_BODY'

响应

201 Created

application/json

字段类型说明
filenamestring
inputAssetIdstring
mimeTypestring
sizeBytesinteger
uploadedAtinteger
{
  "filename": "string",
  "inputAssetId": "string",
  "mimeType": "string",
  "sizeBytes": 0,
  "uploadedAt": 0
}
400 Bad Request

application/json

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

application/json

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

application/json

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

application/json

字段类型说明
codestring
errorstring
{
  "code": "string",
  "error": "string"
}
413 Request Entity Too Large

application/json

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

application/json

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

application/json

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