Request body
sourceUrl— Canonical YouTube video URL or share link. Required iffileis not provided.file— Optional uploaded video file corresponding to the YouTube content (multipart/form-data).sourceName— Optional label stored with the transcript.options— Optional object. Supported keys:transcriptionModel— Preferred transcription backend (whisper-large-v3, etc.).includeCaptions— Boolean; merge official closed captions when available (defaulttrue).captureChapters— Boolean; capture YouTube chapter markers in the output (defaulttrue).segmentLength— Target characters per chunk (default800).
webhookUrl— Optional HTTPS URL Horizon should call when the extraction finishes.
Sample request
Response
Returns202 Accepted with jobId, status, statusUrl, and optional etaSeconds. When complete, result includes transcript chunks, YouTube details (title, channel, publish date), and chapter markers when enabled.
Notes
- Only public or unlisted videos are supported; private videos require exporting and using the
/extract/videoendpoint instead. - Horizon downloads the video in the background; no additional hosting required.
- Captions are merged with the transcription by default; disable via
includeCaptions: falseif you want raw ASR output. - Poll
GET /jobs/{jobId}(same as thestatusUrl) to monitor progress or fetch transcripts and accompanying details later. - To upload a video file manually, send
multipart/form-datawith afilefield instead ofsourceUrl.
x402 flow
YouTube extraction is billed through Coinbase’s x402 protocol. When payment is required, expect:/verify and /settle, then replay the request with the facilitator-issued Base64 token inside X-PAYMENT. Horizon resumes processing and returns settlement details in X-PAYMENT-RESPONSE.Body
application/json
Provide either sourceUrl or file.
Extraction hints such as language, segmentLength, transcriptionModel, or sheet preferences depending on the endpoint.
Webhook to call when the extraction completes.
Upload the raw file instead of providing sourceUrl.
Response
Extraction job accepted
Example:
"job_01hx9q9"
Available options:
queued, processing, completed, failed Canonical link to GET /jobs/{jobId} for this job.
Example:
"extract/pdf"
Present when the job completes synchronously.
Estimated seconds until completion.