Get S2S Time Status
curl --request GET \
--url https://secureai.hiperai.ai/api/external/speech/s2s/status \
--header 'Authorization: Bearer <token>'import requests
url = "https://secureai.hiperai.ai/api/external/speech/s2s/status"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://secureai.hiperai.ai/api/external/speech/s2s/status', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"success": true,
"remaining_minutes": 38.2896,
"total_minutes": 45,
"used_minutes": 6.7104,
"has_time_remaining": true,
"next_renewal_date": "2025-12-01T12:55:35.721Z",
"non_renewable": false,
"request_id": "a8c307b4-c0c9-4b30-98db-5aced06c1cfe"
}{
"success": false,
"error": "Invalid API key",
"message": "The provided API key is invalid or has been revoked",
"request_id": "req-abc123"
}{
"success": false,
"error": "Invalid API key",
"message": "The provided API key is invalid or has been revoked",
"request_id": "req-abc123"
}{
"success": false,
"error": "Invalid API key",
"message": "The provided API key is invalid or has been revoked",
"request_id": "req-abc123"
}模型与 AI 生成
获取S2S时间状态
Retrieve the current Speech-to-Speech (S2S) time status for the billing user, including remaining time, total monthly limit, used time, and renewal information.
S2S Time Quotas:
- Quotas are based on the user’s license tier
- Time resets monthly based on the license assignment date
- Non-renewable trial licenses don’t auto-reset
GET
/
speech
/
s2s
/
status
Get S2S Time Status
curl --request GET \
--url https://secureai.hiperai.ai/api/external/speech/s2s/status \
--header 'Authorization: Bearer <token>'import requests
url = "https://secureai.hiperai.ai/api/external/speech/s2s/status"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://secureai.hiperai.ai/api/external/speech/s2s/status', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"success": true,
"remaining_minutes": 38.2896,
"total_minutes": 45,
"used_minutes": 6.7104,
"has_time_remaining": true,
"next_renewal_date": "2025-12-01T12:55:35.721Z",
"non_renewable": false,
"request_id": "a8c307b4-c0c9-4b30-98db-5aced06c1cfe"
}{
"success": false,
"error": "Invalid API key",
"message": "The provided API key is invalid or has been revoked",
"request_id": "req-abc123"
}{
"success": false,
"error": "Invalid API key",
"message": "The provided API key is invalid or has been revoked",
"request_id": "req-abc123"
}{
"success": false,
"error": "Invalid API key",
"message": "The provided API key is invalid or has been revoked",
"request_id": "req-abc123"
}获取S2S时间状态
检索计费用户当前的语音到语音 (S2S) 时间状态。端点
GET /speech/s2s/status
说明
检索计费用户当前的 S2S 时间状态,包括剩余时间、每月总限额、已使用时间和续订信息。S2S 时间配额
- 配额基于用户的许可级别
- 时间根据许可证分配日期每月重置
- 不可续订的试用许可证不会自动重置
身份验证
必需:API 密钥Authorization: Bearer sk-your-api-key-here
查询参数
| 参数 | 类型 | 必填 | 描述 |
|---|---|---|---|
user_id | 字符串 | 没有 | 用于检查状态的用户 ID(默认为 API 密钥所有者) |
请求示例
curl -X GET "https://{customer.name}.hiperai.ai/api/external/speech/s2s/status?user_id=60a7c8f5e8b4f5001f7a8c23" \
-H "Authorization: Bearer sk-your-api-key-here"
JavaScript/Node.js
const response = await fetch('https://{customer.name}.hiperai.ai/api/external/speech/s2s/status?user_id=60a7c8f5e8b4f5001f7a8c23', {
method: 'GET',
headers: {
'Authorization': 'Bearer sk-your-api-key-here'
}
});
const data = await response.json();
console.log('Remaining minutes:', data.remaining_minutes);
console.log('Total minutes:', data.total_minutes);
console.log('Used minutes:', data.used_minutes);
import requests
url = "https://{customer.name}.hiperai.ai/api/external/speech/s2s/status"
headers = {
"Authorization": "Bearer sk-your-api-key-here"
}
params = {
"user_id": "60a7c8f5e8b4f5001f7a8c23"
}
response = requests.get(url, headers=headers, params=params)
result = response.json()
print('Remaining minutes:', result['remaining_minutes'])
print('Total minutes:', result['total_minutes'])
print('Used minutes:', result['used_minutes'])
回应
成功响应 (200)
{
"success": true,
"remaining_minutes": 38.2896,
"total_minutes": 45,
"used_minutes": 6.7104,
"has_time_remaining": true,
"next_renewal_date": "2025-12-01T12:55:35.721Z",
"non_renewable": false,
"request_id": "a8c307b4-c0c9-4b30-98db-5aced06c1cfe"
}
响应字段
| 领域 | 类型 | 描述 |
|---|---|---|
success | 布尔 | 对于成功的请求始终如此 |
remaining_minutes | 数量 | 剩余 S2S 时间(分钟) |
total_minutes | 数量 | 每月 S2S 总时限 |
used_minutes | 数量 | 本月使用S2S时间 |
has_time_remaining | 布尔 | 用户是否还有剩余S2S时间 |
next_renewal_date | 字符串|空 | S2S 时间配额何时重置(不可续订许可证为空) |
non_renewable | 布尔 | 这是否是不可续订的试用许可证 |
request_id | 字符串 | 请求 ID 进行跟踪 |
错误响应
400 错误请求
{
"success": false,
"error": "Invalid user_id",
"message": "The specified user_id is invalid"
}
401 未经授权
{
"success": false,
"error": "Invalid API key",
"message": "The provided API key is invalid or has been revoked"
}
404 未找到
{
"success": false,
"error": "User not found",
"message": "The specified user_id does not exist"
}
500 内部服务器错误
{
"success": false,
"error": "Internal server error",
"message": "An unexpected error occurred"
}
注释
- 在启动 S2S 会话之前检查此端点以确保有足够的时间可用
user_id参数允许检查不同用户的状态(默认为 API 密钥所有者)- 时间配额基于用户的许可级别
- 不可续订的试用许可证将具有
non_renewable: true和next_renewal_date: null
授权
API key authentication using Bearer token format.
Example: Authorization: Bearer sk-your-api-key-here
查询参数
Optional user ID to check status for (defaults to API key owner)
示例:
"60a7c8f5e8b4f5001f7a8c23"
响应
S2S time status
示例:
true
Remaining S2S time in minutes
示例:
38.2896
Total monthly S2S time limit
示例:
45
Used S2S time this month
示例:
6.7104
Whether user has any remaining S2S time
示例:
true
When the S2S time quota will reset (null for non-renewable licenses)
示例:
"2025-12-01T12:55:35.721Z"
Whether this is a non-renewable trial license
示例:
false
Request ID for tracking
示例:
"a8c307b4-c0c9-4b30-98db-5aced06c1cfe"

