Introduction
L'API REKORD est construite sur Next.js 15 App Router. Toutes les routes sont sous /api/ et retournent du JSON.
BASE URL
https://rekord.ci/api
EN-TÊTES REQUIS
Content-Type: application/json
Cookie: next-auth.session-token=<votre_token>
Authentification
REKORD utilise NextAuth.js. Sans session valide, toutes les routes retournent 401 Unauthorized.
Vidéos
Upload chunké
WORKFLOW COMPLET
// 1. Créer la vidéo
const { id: videoId } = await fetch('/api/videos', {
method: 'POST',
body: JSON.stringify({ title: 'Mon enregistrement' })
}).then(r => r.json())
// 2. Upload des chunks (512 Ko chacun)
const uploadId = crypto.randomUUID()
for (let i = 0; i < totalChunks; i++) {
const form = new FormData()
form.append('chunk', blob.slice(i * CHUNK_SIZE, (i+1) * CHUNK_SIZE))
form.append('uploadId', uploadId)
form.append('videoId', videoId)
form.append('chunkIndex', String(i))
form.append('totalChunks', String(totalChunks))
await fetch('/api/upload/chunk', { method: 'POST', body: form })
}
// 3. Finaliser
await fetch('/api/upload/finalize', {
method: 'POST',
body: JSON.stringify({ uploadId, videoId, title })
})
// → Worker: FFmpeg → MP4, Whisper → sous-titres, GPT → résumé
Éditeur & Export
IA & Transcription
Combine OpenAI Whisper (transcription) et GPT-4o (analyse sémantique) pour détecter silences, mots de remplissage et répétitions.
Webhooks BIENTÔT
Événements planifiés :
→ video.ready
→ video.failed
→ video.export_complete
→ video.deleted
Codes d'erreur
400Bad RequestParamètres manquants ou invalides
401UnauthorizedSession absente ou expirée
403ForbiddenAccès refusé (admin requis)
404Not FoundRessource introuvable ou supprimée
500Internal ErrorErreur serveur, Oracle OCI ou Prisma
SDKs & Clients
JAVASCRIPT / TYPESCRIPT
// Installation (bientôt sur npm)
npm install @rekord/sdk
// Usage
import { RekordClient } from '@rekord/sdk'
const client = new RekordClient({ apiKey: 'rk_live_...' })
// Lister les vidéos
const videos = await client.videos.list()
// Uploader un fichier
const video = await client.videos.upload({
file: blob,
title: 'Mon enregistrement',
onProgress: (p) => console.log(p + '%')
})
SDK Python, Flutter et React Native — Q3 2025