Fetch a signed SMLTP compliance receipt
curl --request GET \
--url https://secureai.hiperai.ai/api/external/receipts/{bundleId} \
--header 'Authorization: Bearer <token>'import requests
url = "https://secureai.hiperai.ai/api/external/receipts/{bundleId}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://secureai.hiperai.ai/api/external/receipts/{bundleId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));安全、护栏与审计
合规收据
获取已签名的 SMLTP 合规收据以完成
GET
/
receipts
/
{bundleId}
Fetch a signed SMLTP compliance receipt
curl --request GET \
--url https://secureai.hiperai.ai/api/external/receipts/{bundleId} \
--header 'Authorization: Bearer <token>'import requests
url = "https://secureai.hiperai.ai/api/external/receipts/{bundleId}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://secureai.hiperai.ai/api/external/receipts/{bundleId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));合规收据
当通过 SMLTP 网关路由完成时,SecureAI 会生成一份签名的合规性收据——管理调用的策略的加密证明。该端点通过其捆绑 ID 获取该收据。 仅网关路由部署存在收据。在直接提供商部署中,没有用于签署收据的网关,并且此端点返回404。
端点
GET /receipts/:bundleId
包 id 的来源
每当为调用创建 SMLTP 权利时,完成响应都会公开捆绑包 ID:- 经典端点:
metadata.smltp.bundle_id(以及现成的metadata.smltp.receipt_url)。 - OpenAI 兼容端点:
secureai.smltp_bundle_id。
jti-…)。然而,仅当流量通过 SMLTP 网关路由时,该 ID 处的签名收据才存在 — 在直接部署中,此端点返回 404(见下文)。
身份验证
Authorization: Bearer sk-your-api-key-here
请求示例
curl -X GET "https://{customer.name}.hiperai.ai/api/external/receipts/bnd_9f2c...e71" \
-H "Authorization: Bearer sk-your-api-key-here"
回应
200 好
{
"success": true,
"receipt": {
"bundle_id": "bnd_9f2c...e71",
"...": "signed SMLTP receipt payload (policy, entitlement, verdict, signatures)"
}
}
receipt 对象是网关发出的签名有效负载。请参阅 SMLTP 安全性 了解收据如何适应透明度和审计模型。
404 未找到
{
"success": false,
"error": "Receipt not found",
"message": "No receipt for this bundle id. Receipts are only available when requests are routed through the SMLTP gateway, and are retained in its in-memory store for a limited time. The authoritative record is the hash-chained audit log."
}
400 错误请求
当捆绑包 ID 丢失或长度超过 128 个字符时返回。注释
- 收据在网关的内存存储中保存一段有限的时间。对于长期证明,请依赖哈希链审计日志——权威的、不可变的记录。请参阅不可变日志。
- 并非每个部署都通过网关进行路由;将
404视为“此呼叫没有网关收据”,而不是集成中的错误。

