Skip to content
RelationsAI
Try it uses test keys only. Requests go straight from your browser to https://voice-api.relationsai.com/v1 with a rai_test_ key, which never places a real call. It works once the API is enabled for your workspace (private preview: support@relationsai.com). Your key stays in this tab's memory; live keys are refused.
RelationsAI API

Get a short-lived link to a call recording and download the audio.


GET
https://voice-api.relationsai.com/v1
/calls/{call_id}/recording
Bearer (rai_test_... or rai_live_...)

Returns the recording's state and, when it is ready, a short-lived HTTPS link to the audio (about 15 minutes; see expires_at). The link needs no API key, so treat it like a password and do not log or store it; ask for a new one when you need it. Recordings are usually ready within a minute of the call ending. A call that was not answered has no recording (state: absent).

GET /v1/calls/{call_id}/recording · Operation ID: getCallRecording

Retrieve a call recording link › path Parameters

call_id
​string · pattern: ^call_[A-Za-z0-9_-]{… · required

The call id (call_...).

Retrieve a call recording link › Responses

The recording state and, when ready, a fresh link.

The call recording. When `state` is `ready`, `url` is a short-lived HTTPS link to the audio that needs no API key. Fetch it before `expires_at`, and retrieve this object again for a fresh link. Do not store the link.
object
​string · const · required

Always call_recording.

Const value: call_recording
livemode
​boolean · required

Mode of the call.

call_id
​string · required

The call.

state
​string · enum · required

pending, ready, absent (no recording exists for this call) or failed. Open enum.

Enum values:
pending
ready
absent
failed
simulated
​boolean · required

True for the short synthetic audio file used in test mode.

url
​string | null · uri · required

Short-lived link to the audio. Null unless state is ready.

expires_at
​string | null · date-time · required

When url stops working.

content_type
​string | null · required

Media type of the audio, for example audio/ogg or audio/mpeg (audio/wav for test-mode audio). Null when not known in advance; the download's Content-Type is authoritative.


Download recording audio

GET
https://voice-api.relationsai.com/v1
/recordings/{recording_token}

Streams the audio of a recording. You do not build this URL yourself: it is the url returned by GET /v1/calls/{call_id}/recording. The token in the path is the credential, so no Authorization header is needed (it is ignored), and the link stops working at its expires_at. Scope: the key that calls GET /v1/calls/{call_id}/recording needs recordings:read to obtain the link; the download itself needs no key and no scope (x-required-scopes names the scope behind the link). Supports Range requests for seeking; a range that cannot be served is answered with the whole file (200).

GET /v1/recordings/{recording_token} · Operation ID: downloadRecording

Download recording audio › path Parameters

recording_token
​string · minLength: 16 · maxLength: 512 · pattern: ^[A-Za-z0-9._~-]+$ · required

The opaque token from a recording url. It is the credential for this request.

Download recording audio › Headers

Range
​string · pattern: ^bytes=[0-9]*-[0-9]*…

A byte range, for example bytes=0-65535.

Download recording audio › Responses

The whole audio file. The media type is the recording's own (content_type on the recording object); test-mode recordings are audio/wav.

string

Audio bytes.