SSE API

Audio

Connection Information

ItemValue
Base pathhttps://vas-poc.vurbo.ai/api/v1/sse
ProtocolHTTP
AuthenticationHeader X-API-Key: {KEY}

Note: Although the path includes /sse/, this endpoint returns an audio file (not an SSE stream). It supports HTTP Range Requests to enable seek-and-play.


Endpoint Overview

MethodEndpointDescription
GET/api/v1/sse/audio/{taskId}Play audio file

GET /api/v1/sse/audio/{taskId}

Description

Streams the recording audio for the specified task, with support for HTTP Range Requests to enable seek-and-play.

Difference from the Audio Download API (GET /api/v1/tasks/{taskId}/audio/export):

  • This endpoint: intended for playback; supports HTTP Range Requests (seekable progress), suitable for an HTML5 <audio> element or a streaming player.
  • Audio download: intended for offline download; the response includes a Content-Disposition: attachment header, so the browser saves it directly as a file.

Use Cases

  • Play recording audio
  • Support seeking the playback position

Authentication

Header: X-API-Key (see Authentication)

Request Parameters

ParameterLocationTypeRequiredDescription
taskIdpathstringYesRecording ID (UUID)

Request Example

# Download the complete audio file
curl -X GET "https://vas-poc.vurbo.ai/api/v1/sse/audio/550e8400-e29b-41d4-a716-446655440000" \
  -H "X-API-Key: vas_aB3dE5fG7hI9jK1lM3nO5pQ7rS9tU1vW" \
  -o audio.m4a

# Range Request (partial download)
curl -X GET "https://vas-poc.vurbo.ai/api/v1/sse/audio/550e8400-e29b-41d4-a716-446655440000" \
  -H "X-API-Key: vas_aB3dE5fG7hI9jK1lM3nO5pQ7rS9tU1vW" \
  -H "Range: bytes=0-1023" \
  -o audio_part.m4a

Response Format

Complete file (HTTP 200):

HTTP/1.1 200 OK
Content-Type: audio/mp4
Content-Length: 1234567
Accept-Ranges: bytes
Cache-Control: no-cache

Note: The vast majority of recordings are returned in an M4A container (AAC encoding), with a Content-Type of audio/mp4 and a .m4a extension. The actual Content-Type depends on the recording's storage format (a few legacy or broadcast recordings may be audio/webm or audio/wav), so rely on the Response Header.

Partial file (HTTP 206 - Range Request):

HTTP/1.1 206 Partial Content
Content-Type: audio/mp4
Content-Length: 1024
Content-Range: bytes 0-1023/1234567
Accept-Ranges: bytes

Specific Error Codes

Error CodeHTTP StatusDescriptionRecommended Action
recording_not_found404Recording not foundVerify that taskId is correct
recording_audio_not_ready422Audio file upload not yet completeRetry later
storage_download_failed500Storage service download failedRetry later

Frontend Example

async function playAudio(taskId, apiKey) {
  const response = await fetch(
    `https://vas-poc.vurbo.ai/api/v1/sse/audio/${taskId}`,
    {
      headers: {
        'X-API-Key': apiKey
      }
    }
  );

  const blob = await response.blob();
  const audioUrl = URL.createObjectURL(blob);
  const audio = new Audio(audioUrl);
  audio.play();
}
// Using an HTML5 Audio element
async function setupAudioPlayer(taskId, apiKey) {
  const response = await fetch(
    `https://vas-poc.vurbo.ai/api/v1/sse/audio/${taskId}`,
    {
      headers: {
        'X-API-Key': apiKey
      }
    }
  );

  const blob = await response.blob();
  const audioUrl = URL.createObjectURL(blob);

  const audioElement = document.getElementById('audio-player');
  audioElement.src = audioUrl;
  audioElement.load();
}

Version: V1.5.7 Last Updated: 2026-05-20

Copyright © 2026