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
| endpoint | Base URL of Record Labs. Defaults to the page's own origin. |
|---|---|
| api-key | Key from the Integrations section. Leave it out inside the Record Labs app itself (the login cookie is used). |
| lang | en or ar. Arabic switches the text and the direction. |
| modes | Which buttons to show: any of mic, tab (device audio + mic, desktop only), meeting. |
| title | Default 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-errorColours
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/recordings | Upload 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/meetings | JSON { "meeting_url": "https://meet.google.com/...", "title": "..." }. Sends the recorder into the meeting. Returns a recording in status joining. |
| GET /api/recordings | List the account's recordings, newest first. |
| GET /api/recordings/:id | One recording with transcript, utterances (speaker, start, end, text) and summary (Markdown). |
| GET /api/recordings/:id/audio | The audio file. Supports range requests, so it can be used directly in an <audio> tag. |
| PATCH /api/recordings/:id | JSON { "title": "..." } to rename, or { "retry": "transcribe" } / { "retry": "summarize" } to run a step again. |
| DELETE /api/recordings/:id | Delete the recording and its audio. |
Statuses
joining → in_call → uploaded → transcribing → summarizing → ready, 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());