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
| Parameter | Type | Required | Description |
|---|---|---|---|
contentId | string | Yes | The ID of the video or audio content to generate a transcript for |
Body Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
forceTranscriptGeneration | boolean | No | false | Regenerate transcript even if one already exists |
forceEmbeddingGeneration | boolean | No | false | Regenerate 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}'