Read credit balance / 查询积分余额
curl --request GET \
--url https://apistable.com/v1/balance \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://apistable.com/v1/balance', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://apistable.com/v1/balance"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"balance_credits": 1,
"reserved_credits": 1,
"available_credits": 1
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}核心概念
积分与计费
美元购买积分,逐项核对结果费用。
GET
/
v1
/
balance
Read credit balance / 查询积分余额
curl --request GET \
--url https://apistable.com/v1/balance \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://apistable.com/v1/balance', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://apistable.com/v1/balance"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"balance_credits": 1,
"reserved_credits": 1,
"available_credits": 1
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}当前为 API 预览。生成接口尚未接入供应商,成功认证后仍可能返回 503;不会创建任务或扣积分。
购买、冻结与可用
支付订单记录美元与到账积分,模型消费记为 Credits。购买积分不计入 API 用量。可用积分等于账面积分减去未释放冻结。 预览价格仅为示例。正式兑换比例、支付渠道和各渠道实际费率应在开放收费前发布。 查看价格 打开账务读取账户余额
GET /v1/balance 需要 usage:read,返回 balance_credits、reserved_credits 与 available_credits。新账户返回零是正常情况,端点不会创建试用积分或执行支付。{
"balance_credits": 0,
"reserved_credits": 0,
"available_credits": 0
}
四个结果,一笔清晰合计
| 结果 | 实扣 | 释放 |
|---|---|---|
| 低价成功 | 20 积分 | 40 积分 |
| 低价成功 | 20 积分 | 40 积分 |
| 官方成功 | 60 积分 | 0 积分 |
| 两次尝试均失败 | 0 积分 | 60 积分 |
| 合计 / 初始冻结 240 | 100 积分 | 140 积分 |
仅为示例。失败尝试是平台成本,不额外计入用户账单。每个结果项最多一笔最终消费。
受理时锁定价格
- 每渠道独立按参数计价,包含取整、最低单位及适用附加项。
- 官方成功按已披露官方价,低价成功按低价;之后调价不能提高已受理上限。
- 未知项只保留自身冻结,已明确成功或失败的其他项可独立结算或释放。
- LLM 流式中断与音乐原生组合使用各自已发布计量契约,不能直接套用图片/视频规则。
授权
API key beginning as_. Keep on the server. Scope permissions are checked separately.