Skip to main content

Enqueue Transcript by Content ID

This endpoint enqueues a background job to generate a transcript (and optional embeddings) for a single content item, identified by its contentId.

Endpoint​

POST /api/transcript/:contentId/enqueue

Authentication​

Optional.
Authenticated users can trigger transcript generation, but it is not strictly required.

Parameters​

Path Parameters​

ParameterTypeRequiredDescription
contentIdstringYesThe ID of the video or audio content to generate a transcript for

Body Parameters​

ParameterTypeRequiredDefaultDescription
forceTranscriptGenerationbooleanNofalseRegenerate transcript even if one already exists
forceEmbeddingGenerationbooleanNofalseRegenerate embeddings even if they already exist

Response​

Success Response​

Code: 202 Accepted

Content Example:

{
"jobId": "transcript-2261425",
"state": "pending"
}

Error Response​

Code: 500 Internal Server Error

Content Example:

{ "error": "Failed to enqueue transcript job" }

Notes​

  • This operation adds a new job to the BullMQ queue (transcriptsQueue) for processing.
  • The worker will:
    • Extract audio from the source video
    • Generate transcript text via OpenAI
    • Optionally generate embeddings and upload them to Qdrant
  • Duplicate or completed jobs are automatically cleared before re-enqueuing.

Example​

curl -X POST "https://api.tribesocial.io/api/transcript/2261425/enqueue" \
-H "Content-Type: application/json" \
-d '{"forceTranscriptGeneration": true, "forceEmbeddingGeneration": false}'