Skip to main content
GET
Get S2S Time Status

获取S2S时间状态

检索计费用户当前的语音到语音 (S2S) 时间状态。

端点

说明

检索计费用户当前的 S2S 时间状态,包括剩余时间、每月总限额、已使用时间和续订信息。

S2S 时间配额

  • 配额基于用户的许可级别
  • 时间根据许可证分配日期每月重置
  • 不可续订的试用许可证不会自动重置

身份验证

必需:API 密钥

查询参数

请求示例

JavaScript/Node.js

###Python

回应

成功响应 (200)

响应字段

错误响应

400 错误请求

401 未经授权

404 未找到

500 内部服务器错误

注释

  • 在启动 S2S 会话之前检查此端点以确保有足够的时间可用
  • user_id 参数允许检查不同用户的状态(默认为 API 密钥所有者)
  • 时间配额基于用户的许可级别
  • 不可续订的试用许可证将具有 non_renewable: true 和 next_renewal_date: null

授权

Authorization
string
header
必填

API key authentication using Bearer token format. Example: Authorization: Bearer sk-your-api-key-here

查询参数

user_id
string

Optional user ID to check status for (defaults to API key owner)

示例:

"60a7c8f5e8b4f5001f7a8c23"

响应

S2S time status

success
boolean
示例:

true

remaining_minutes
number

Remaining S2S time in minutes

示例:

38.2896

total_minutes
number

Total monthly S2S time limit

示例:

45

used_minutes
number

Used S2S time this month

示例:

6.7104

has_time_remaining
boolean

Whether user has any remaining S2S time

示例:

true

next_renewal_date
string<date-time>

When the S2S time quota will reset (null for non-renewable licenses)

示例:

"2025-12-01T12:55:35.721Z"

non_renewable
boolean

Whether this is a non-renewable trial license

示例:

false

request_id
string

Request ID for tracking

示例:

"a8c307b4-c0c9-4b30-98db-5aced06c1cfe"