Trigger Analysis
POST /api/agents/youtube/analyze/{job_id}
Trigger LLM analysis on a completed transcript.
The endpoint sets status to “analyzing”, runs analyze_transcript, and
only marks the job “complete” if analysis actually succeeded. On failure
the job is persisted with status=“error” and the real cause surfaces as
a 502 so the UI can show why and offer a retry.
Args: job_id: The job identifier.
Returns: The updated job record with status=“complete” and progress=100.
Raises:
HTTPException(404): No job exists with the given id, or no transcript
is available to analyze.
HTTPException(409): The job is not in complete status (can’t
analyze mid-transcription).
HTTPException(502): The handler dispatch failed or the response
couldn’t be parsed — error_message on the persisted job
carries the underlying reason.
Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ”Responses
Section titled “ Responses ”Successful Response
Transcription job status.
object
Unique job identifier
YouTube video ID
Original YouTube URL
Video title
Channel name
Video duration in seconds
Current job status
Progress percentage
ISO timestamp of job creation
Validation Error