跳转到主要内容
POST
/
audio
/
quote
/api/v1/audio/quote
curl --request POST \
  --url https://api.venice.ai/api/v1/audio/quote \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "model": "elevenlabs-music",
  "duration_seconds": 60,
  "character_count": 100
}
'
{
  "quote": 0.75
}
在调用 /audio/queue 之前使用此端点,可估算所选模型和参数下音频生成请求的美元费用。

Postman 集合

如需更多示例,请参阅此 Postman 集合

授权

Authorization
string
header
必填

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

请求体

application/json
model
string
必填

The model to get a price quote for.

示例:

"elevenlabs-music"

duration_seconds

Optional duration hint in seconds. Only supported for models that expose duration metadata via /models. Accepts either an integer or a numeric string. If omitted, the model default duration is used when available.

必填范围: x > 0
示例:

60

character_count
integer

Optional character count for character-based pricing models. Required when the selected model uses pricing.per_thousand_characters in /models.

必填范围: x > 0
示例:

100

响应

Price quote for audio generation

quote
number
必填

The estimated price in USD for the audio generation.

示例:

0.75