Validate input and estimate credits / 校验与估价
curl --request POST \
--url https://apistable.com/v1/quotes \
--header 'Content-Type: application/json' \
--data '
{
"model": "prism-image-2",
"input": {
"prompt": "<string>",
"duration_seconds": 123,
"resolution": "<string>",
"seed": 1,
"generate_audio": true,
"instrumental": true,
"lyrics": "<string>"
},
"output_count": 1,
"fallback": false,
"max_credits": 1
}
'const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
model: 'prism-image-2',
input: {
prompt: '<string>',
duration_seconds: 123,
resolution: '<string>',
seed: 1,
generate_audio: true,
instrumental: true,
lyrics: '<string>'
},
output_count: 1,
fallback: false,
max_credits: 1
})
};
fetch('https://apistable.com/v1/quotes', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://apistable.com/v1/quotes"
payload = {
"model": "prism-image-2",
"input": {
"prompt": "<string>",
"duration_seconds": 123,
"resolution": "<string>",
"seed": 1,
"generate_audio": True,
"instrumental": True,
"lyrics": "<string>"
},
"output_count": 1,
"fallback": False,
"max_credits": 1
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"is_preview": true,
"model": "<string>",
"input": {
"prompt": "<string>",
"duration_seconds": 123,
"resolution": "<string>",
"aspect_ratio": "16:9",
"seed": 1,
"generate_audio": true,
"instrumental": true,
"lyrics": "<string>"
},
"output_count": 2,
"estimated_credits": 1,
"max_reserved_credits": 1,
"channel_quotes": [
{
"channel_type": "third_party",
"credits": 1
}
],
"price_version": "<string>",
"live_available": false
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}接口参考
获取报价
查看合格渠道价格与整次最高冻结积分。
POST
/
v1
/
quotes
Validate input and estimate credits / 校验与估价
curl --request POST \
--url https://apistable.com/v1/quotes \
--header 'Content-Type: application/json' \
--data '
{
"model": "prism-image-2",
"input": {
"prompt": "<string>",
"duration_seconds": 123,
"resolution": "<string>",
"seed": 1,
"generate_audio": true,
"instrumental": true,
"lyrics": "<string>"
},
"output_count": 1,
"fallback": false,
"max_credits": 1
}
'const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
model: 'prism-image-2',
input: {
prompt: '<string>',
duration_seconds: 123,
resolution: '<string>',
seed: 1,
generate_audio: true,
instrumental: true,
lyrics: '<string>'
},
output_count: 1,
fallback: false,
max_credits: 1
})
};
fetch('https://apistable.com/v1/quotes', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://apistable.com/v1/quotes"
payload = {
"model": "prism-image-2",
"input": {
"prompt": "<string>",
"duration_seconds": 123,
"resolution": "<string>",
"seed": 1,
"generate_audio": True,
"instrumental": True,
"lyrics": "<string>"
},
"output_count": 1,
"fallback": False,
"max_credits": 1
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"is_preview": true,
"model": "<string>",
"input": {
"prompt": "<string>",
"duration_seconds": 123,
"resolution": "<string>",
"aspect_ratio": "16:9",
"seed": 1,
"generate_audio": true,
"instrumental": true,
"lyrics": "<string>"
},
"output_count": 2,
"estimated_credits": 1,
"max_reserved_credits": 1,
"channel_quotes": [
{
"channel_type": "third_party",
"credits": 1
}
],
"price_version": "<string>",
"live_available": false
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}当前为 API 预览。生成接口尚未接入供应商,成功认证后仍可能返回 503;不会创建任务或扣积分。
为完整参数报价
服务端先补齐默认值、过滤不兼容渠道,再应用各渠道计价公式。时长、分辨率、音频、质量和 output_count 都可能改变总价。 最高冻结覆盖每个结果项的一条成功渠道,不累加全部可能的失败尝试。报价说明受理上界,不保证预览模型可以真实运行。理解费用上限
{
"is_preview": true,
"model": "prism-image-2",
"input": {
"prompt": "A sculptural chair in warm afternoon light",
"resolution": "1024"
},
"output_count": 4,
"estimated_credits": 80,
"max_reserved_credits": 240,
"channel_quotes": [
{
"channel_type": "third_party",
"credits": 80
},
{
"channel_type": "official",
"credits": 240
}
],
"price_version": "preview-2026-10-29",
"live_available": false
}
channel_quotes[].credits 是整批使用该渠道的总价,不是单项价格。此端点返回未冻结的预览估价,不签发 quote_id,也不是已锁定的购买要约。
设置 max_credits
max_credits 是整次请求的费用上限。如果服务端最高冻结超过它,必须在生成前拒绝整批;不能静默减少 output_count,也不在各项之间动态分配不足预算。请求体
application/json
Minimum string length:
1示例:
"prism-image-2"
Current preview input. Supported fields vary by modality and exact catalog model. No live provider mapping is implied.
Show child attributes
Show child attributes
Target result count. Images/videos accept 1–4; music and LLM must remain 1. Not a concurrency guarantee. / 目标结果数,非同时并发保证。
必填范围:
1 <= x <= 4Authorizes a higher-priced compatible official fallback after an eligible confirmed failure. Live execution is disabled in this build.
Whole-request reservation cap. Reject the entire request when max_reserved_credits exceeds it.
必填范围:
x >= 0响应
Preview quote
Current preview input. Supported fields vary by modality and exact catalog model. No live provider mapping is implied.
Show child attributes
Show child attributes
必填范围:
1 <= x <= 4Credits, not USD. / 积分,非美元。
必填范围:
x >= 0Credits, not USD. / 积分,非美元。
必填范围:
x >= 0Show child attributes
Show child attributes