Skip to main content

Audio & Video API

Stream media files, retrieve transcriptions, and trigger AI-powered analysis for audio and video memories.

Overview

The Audio & Video API provides endpoints for streaming media files, managing transcriptions, and running frame-level video interpretation. Audio and video memories are created via the standard Memories API file upload, then accessed through these specialized endpoints.

Authentication: All endpoints require a Bearer token in the Authorization header.

Stream Audio

Stream the raw audio file for a memory. Supports HTTP range requests for seeking and partial downloads.

GET /memories/:id/stream

Parameters

  • id (path, required) — Memory ID
  • Range (header, optional) — Byte range for partial content, e.g. bytes=0-1048575

Returns the audio binary stream with appropriate Content-Type and range headers.

curl -H "Authorization: Bearer gdb_your_api_key" \
  "https://api.trixdb.com/v1/memories/mem_7x9kQ2mN8pL3/stream" \
  --output audio.mp3

Get Audio Transcript

Retrieve the full transcription for an audio memory. Returns segments with timestamps, detected entities, chapters, and content safety labels. Returns 202 if transcription is still processing.

GET /memories/:id/transcript

Parameters

  • id (path, required) — Memory ID

Response fields

  • full_transcript — Complete text of the transcription
  • language / language_confidence — Detected language and confidence score
  • duration — Audio duration in seconds
  • provider — Transcription provider used
  • segments — Array of timestamped transcript segments
  • entities — Detected named entities
  • chapters — Auto-generated chapter markers
  • summary — Auto-generated summary
curl -H "Authorization: Bearer gdb_your_api_key" \
  "https://api.trixdb.com/v1/memories/mem_7x9kQ2mN8pL3/transcript"

Trigger Audio Transcription

Start an asynchronous transcription job for an audio memory. Returns 202 Accepted immediately. Poll the transcript endpoint to check completion. Returns 409 if a transcription is already in progress.

POST /memories/:id/transcribe

Parameters

  • id (path, required) — Memory ID

Body (all optional)

  • language (string) — ISO language code hint
  • prompt (string) — Context prompt for the transcription model
  • provider (string) — Override default transcription provider
  • enableSpeakerDiarization (boolean) — Identify individual speakers
  • enableEntityDetection (boolean) — Detect named entities
  • enableContentSafety (boolean) — Flag unsafe content
  • enableAutoChapters (boolean) — Generate chapter markers
  • enableAutoSummarization (boolean) — Generate a summary
  • speakersExpected (number) — Expected number of speakers
curl -X POST -H "Authorization: Bearer gdb_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{"enableSpeakerDiarization": true, "enableAutoChapters": true}' \
  "https://api.trixdb.com/v1/memories/mem_7x9kQ2mN8pL3/transcribe"

Stream Video

Stream the raw video file for a memory. Supports HTTP range requests for seeking and progressive playback.

GET /memories/:id/video

Parameters

  • id (path, required) — Memory ID
  • Range (header, optional) — Byte range for partial content
curl -H "Authorization: Bearer gdb_your_api_key" \
  "https://api.trixdb.com/v1/memories/mem_7x9kQ2mN8pL3/video" \
  --output video.mp4

Get Video Thumbnail

Stream the auto-generated thumbnail image for a video memory. Returns a WebP image. Returns 404 if no thumbnail has been generated yet.

GET /memories/:id/video/thumbnail

Parameters

  • id (path, required) — Memory ID
curl -H "Authorization: Bearer gdb_your_api_key" \
  "https://api.trixdb.com/v1/memories/mem_7x9kQ2mN8pL3/video/thumbnail" \
  --output thumbnail.webp

Get Video Metadata

Retrieve technical metadata for a video memory including resolution, codec, duration, and audio track information.

GET /memories/:id/video/metadata

Parameters

  • id (path, required) — Memory ID

Response fields

  • filename — Original upload filename
  • mime_type — Video MIME type (e.g. video/mp4)
  • file_size — Size in bytes
  • duration — Duration in seconds
  • video — Video track metadata (resolution, codec, fps)
  • audio — Audio track metadata (codec, sample rate, channels)
  • format — Container format metadata
curl -H "Authorization: Bearer gdb_your_api_key" \
  "https://api.trixdb.com/v1/memories/mem_7x9kQ2mN8pL3/video/metadata"

Get Video Transcript

Retrieve the full transcription for a video memory. Returns the same structure as the audio transcript endpoint. Returns 202 if transcription is still in progress.

GET /memories/:id/video/transcript

Parameters

  • id (path, required) — Memory ID

Response fields

  • full_transcript, language, duration, provider
  • segments, entities, chapters, summary
curl -H "Authorization: Bearer gdb_your_api_key" \
  "https://api.trixdb.com/v1/memories/mem_7x9kQ2mN8pL3/video/transcript"

Trigger Video Transcription

Start an asynchronous transcription job for a video memory. Extracts the audio track and transcribes it. Returns 202 Accepted. Returns 409 if already processing.

POST /memories/:id/video/transcribe

Parameters

  • id (path, required) — Memory ID

Body (all optional)

  • language, prompt, provider — Same as audio transcribe
  • enableSpeakerDiarization, enableEntityDetection
  • enableContentSafety, enableAutoChapters
  • enableAutoSummarization, speakersExpected
curl -X POST -H "Authorization: Bearer gdb_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{"enableSpeakerDiarization": true}' \
  "https://api.trixdb.com/v1/memories/mem_7x9kQ2mN8pL3/video/transcribe"

Trigger Video Interpretation

Start an asynchronous frame analysis job for a video memory. Extracts key frames and analyzes them with a vision model to generate descriptions of visual content. Returns 202 Accepted. Returns 409 if interpretation is already running.

POST /memories/:id/video/interpret

Parameters

  • id (path, required) — Memory ID
curl -X POST -H "Authorization: Bearer gdb_your_api_key" \
  "https://api.trixdb.com/v1/memories/mem_7x9kQ2mN8pL3/video/interpret"

Error Responses

All endpoints return standard HTTP error codes:

  • 400 — Memory is not an audio/video file
  • 403 — Insufficient space access permissions
  • 404 — Memory or media file not found
  • 409 — Transcription/interpretation already in progress
  • 503 — Storage or transcription service unavailable