Get realtime endpoint
curl --request GET \
--url https://api.aircaps.com/v1/realtime/endpoint \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.aircaps.com/v1/realtime/endpoint"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.aircaps.com/v1/realtime/endpoint', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"websocket_url": "wss://rt1.aircaps.ai/v1/realtime",
"model": "aircaps-live-1"
}{
"error": {
"type": "invalid_request_error",
"code": "unsupported_model",
"message": "model 'aircaps-live' is not available for streaming",
"param": null,
"request_id": "req_01k6z3m4q8w7e5r2t1y0u9i8o7"
}
}{
"error": {
"type": "authentication_error",
"code": "unauthorized",
"message": "invalid API key",
"param": null,
"request_id": "req_01k6z3m4q8w7e5r2t1y0u9i8o7"
}
}{
"error": {
"type": "permission_error",
"code": "model_access_denied",
"message": "A5S Streaming v1 is in early access for select organizations, and your organization does not have access yet. To request access, talk to sales at https://aircaps.ai/contact.",
"param": null,
"request_id": "req_01k6z3m4q8w7e5r2t1y0u9i8o7"
}
}{
"error": {
"type": "api_error",
"code": "internal_error",
"message": "internal error",
"param": null,
"request_id": "req_01k6z3m4q8w7e5r2t1y0u9i8o7"
}
}{
"error": {
"type": "api_error",
"code": "service_unavailable",
"message": "temporarily unavailable; please retry",
"param": null,
"request_id": "req_01k6z3m4q8w7e5r2t1y0u9i8o7"
}
}Realtime
Get realtime endpoint
Where to open the /v1/realtime WebSocket for a streaming model. Connect to websocket_url exactly as returned, with the same API key. For AirCaps Live 1 the answer is the server that gives this client the lowest latency among those that can take a session right now: look it up once before every session, and do not hard-code or cache it across sessions. See the AirCaps Live 1 guide.
GET
/
v1
/
realtime
/
endpoint
Get realtime endpoint
curl --request GET \
--url https://api.aircaps.com/v1/realtime/endpoint \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.aircaps.com/v1/realtime/endpoint"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.aircaps.com/v1/realtime/endpoint', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"websocket_url": "wss://rt1.aircaps.ai/v1/realtime",
"model": "aircaps-live-1"
}{
"error": {
"type": "invalid_request_error",
"code": "unsupported_model",
"message": "model 'aircaps-live' is not available for streaming",
"param": null,
"request_id": "req_01k6z3m4q8w7e5r2t1y0u9i8o7"
}
}{
"error": {
"type": "authentication_error",
"code": "unauthorized",
"message": "invalid API key",
"param": null,
"request_id": "req_01k6z3m4q8w7e5r2t1y0u9i8o7"
}
}{
"error": {
"type": "permission_error",
"code": "model_access_denied",
"message": "A5S Streaming v1 is in early access for select organizations, and your organization does not have access yet. To request access, talk to sales at https://aircaps.ai/contact.",
"param": null,
"request_id": "req_01k6z3m4q8w7e5r2t1y0u9i8o7"
}
}{
"error": {
"type": "api_error",
"code": "internal_error",
"message": "internal error",
"param": null,
"request_id": "req_01k6z3m4q8w7e5r2t1y0u9i8o7"
}
}{
"error": {
"type": "api_error",
"code": "service_unavailable",
"message": "temporarily unavailable; please retry",
"param": null,
"request_id": "req_01k6z3m4q8w7e5r2t1y0u9i8o7"
}
}
