HASSANI LABSHASSANI LABS
For developers

Add Record Labs to your app

Two ways: drop in the ready-made component, or talk to the API directly. Both need an API key, created in the app under Integrations. Each key records into the account that created it, so a client gets their own account and their own key.

1. The component (one script tag)

<script src="https://YOUR-DOMAIN/embed/recorder.js"></script>

<call-recorder
  endpoint="https://YOUR-DOMAIN"
  api-key="crk_your_key_here"
  lang="ar"
  modes="mic,tab,meeting">
</call-recorder>

It renders the record button, the level meter, the title box and the upload, in the host page's colours. It works inside plain HTML, React, Angular, Vue or Astro because it is a standard web component.

Attributes

endpointBase URL of Record Labs. Defaults to the page's own origin.
api-keyKey from the Integrations section. Leave it out inside the Record Labs app itself (the login cookie is used).
langen or ar. Arabic switches the text and the direction.
modesWhich buttons to show: any of mic, tab (device audio + mic, desktop only), meeting.
titleDefault title for new recordings (for example the customer's name).

Events

The element fires DOM events so your app can react, for example to attach the recording to a customer record:

document.querySelector('call-recorder').addEventListener('recording-uploaded', (e) => {
  console.log('saved', e.detail.recording.id);
});
// also: recording-started, recording-stopped, meeting-sent, recording-error

Colours

call-recorder { --cr-accent: #d9a441; --cr-rec: #e5533d; --cr-bg: #fff; --cr-fg: #111; --cr-radius: 12px; }

2. The API

Every call takes Authorization: Bearer crk_.... Responses are JSON. Cross-origin calls are allowed.

POST /api/recordingsUpload a finished audio file. multipart/form-data with file, optional title, mode (mic | tab), duration in seconds. Returns the new recording. Transcription starts automatically.
POST /api/meetingsJSON { "meeting_url": "https://meet.google.com/...", "title": "..." }. Sends the recorder into the meeting. Returns a recording in status joining.
GET /api/recordingsList the account's recordings, newest first.
GET /api/recordings/:idOne recording with transcript, utterances (speaker, start, end, text) and summary (Markdown).
GET /api/recordings/:id/audioThe audio file. Supports range requests, so it can be used directly in an <audio> tag.
PATCH /api/recordings/:idJSON { "title": "..." } to rename, or { "retry": "transcribe" } / { "retry": "summarize" } to run a step again.
DELETE /api/recordings/:idDelete the recording and its audio.

Statuses

joiningin_calluploadedtranscribingsummarizingready, or failed with an error message. Poll GET /api/recordings/:id until ready.

Example: upload from a Node script

const form = new FormData();
form.append('file', new Blob([audioBytes], { type: 'audio/mpeg' }), 'call.mp3');
form.append('title', 'Call with Ahmad');
const res = await fetch('https://YOUR-DOMAIN/api/recordings', {
  method: 'POST', headers: { Authorization: 'Bearer crk_...' }, body: form,
});
console.log(await res.json());