估算构建费用
OpenAPI 契约
- 方法
- POST
- 路径
/api/v1/billing/quote- 认证
- jwtBearer (bearer)
- 响应状态
- 200 400 401 403 429 500
请求与响应 Schema
JSON
{
"requestBody": {
"application/json": {
"$ref": "#/components/schemas/QuoteRequest"
}
},
"responses": {
"200": {
"description": "Build quote",
"content": {
"application/json": {
"$ref": "#/components/schemas/BuildQuote"
}
}
},
"400": {
"description": "Invalid request",
"content": {
"application/json": {
"$ref": "#/components/schemas/RequestError"
}
}
},
"401": {
"description": "Authentication required or invalid",
"content": {
"application/json": {
"$ref": "#/components/schemas/SecurityError"
}
}
},
"403": {
"description": "Authenticated but not permitted",
"content": {
"application/json": {
"$ref": "#/components/schemas/SecurityError"
}
}
},
"429": {
"description": "Rate limit exceeded",
"content": {
"application/json": {
"$ref": "#/components/schemas/SecurityError"
}
}
},
"500": {
"description": "Unexpected server error",
"content": {
"application/json": {
"$ref": "#/components/schemas/ApiError"
}
}
}
}
}POST /api/v1/billing/quote 仅限 JWT。可发送 features、platforms、inputBytes 和 methodCountHint;空值或负数数值提示会变为 0,字符串会被裁剪。响应给出估算 NCU、当前余额、可负担性和成本明细。报价本身不会预留积分。
先前获取的报价仅供参考。提交构建时,服务会根据已上传文件以及最终解析的平台和特性重新计算报价,然后暂扣此次提交得到的金额。完成时会将暂扣与实际收费核对,实际收费不超过暂扣额。Phase 2 前的失败会全额退回暂扣;之后的失败按已达编译阶段按比例收费,未使用部分以 BUILD_REFUND 返回。
http
POST /api/v1/billing/quote
Authorization: Bearer <access token>
Content-Type: application/json
{"features":"native-llvm-direct-call","platforms":"windows-x86_64","inputBytes":1048576,"methodCountHint":12}