Skip to main content
POST
/
extract
/
video
Extract video files
curl --request POST \
  --url https://api.horizon.new/v1/extract/video \
  --header 'Content-Type: application/json' \
  --data '{
  "sourceUrl": "<string>",
  "sourceName": "<string>",
  "options": {},
  "webhookUrl": "<string>"
}'
{
  "jobId": "job_01hx9q9",
  "status": "queued",
  "statusUrl": "<string>",
  "result": {},
  "etaSeconds": 123,
  "jobType": "extract/pdf"
}
Transcribe and summarize video files. Horizon extracts audio tracks, produces timestamped transcripts, and captures slide/text overlays when available for rapid knowledge ingestion.

Request body

  • sourceUrl — HTTPS or signed URL to the video (MP4, MOV, MKV, etc.). Required if file is not provided.
  • file — Optional uploaded video file via multipart/form-data.
  • sourceName — Optional label saved with the transcript.
  • options — Optional object. Supported keys:
    • transcriptionModel — Preferred transcription backend (whisper-large-v3, etc.).
    • captureFrames — Boolean; capture representative frames and OCR them (default false).
    • frameIntervalSeconds — Interval for frame capture when captureFrames is true (default 30).
    • segmentLength — Target characters per chunk (default 900).
    • language — ISO language hint.
  • webhookUrl — Optional HTTPS URL Horizon should call when the extraction finishes.

Sample request

curl https://api.horizon.new/v1/extract/video \
  -H "Content-Type: application/json" \
  -d '{
    "sourceUrl": "https://cdn.example.com/video/product-launch.mp4",
    "sourceName": "Product Launch 2025",
    "options": {
      "transcriptionModel": "whisper-large-v3",
      "captureFrames": true,
      "frameIntervalSeconds": 20,
      "segmentLength": 800,
      "language": "en"
    }
  }'

# or upload the raw video (Base64 encoded)

curl https://api.horizon.new/v1/extract/video \
  -H "Content-Type: application/json" \
  -d '{
    "file": "data:video/mp4;base64,AAAAIGZ0eXBpc29tAAACAGlzb2...",
    "sourceName": "Product Launch 2025",
    "options": {
      "transcriptionModel": "whisper-large-v3",
      "captureFrames": true,
      "frameIntervalSeconds": 20,
      "segmentLength": 800,
      "language": "en"
    }
  }'

Response

Returns 202 Accepted with jobId, status, statusUrl, and estimated completion time. Finished jobs include transcript chunks, timestamps, and optional OCR snippets from captured frames.

Notes

  • Large videos process asynchronously; monitor statusUrl or subscribe to job webhooks.
  • Frame capture increases runtime—enable it when deck overlays or screen text matter.
  • Provide language hints for multilingual audio.
  • Poll GET /jobs/{jobId} (same as the statusUrl) to observe progress or fetch the final transcript bundle later.
  • To upload the video directly, send multipart/form-data with a file field instead of sourceUrl.

x402 flow

Video extraction is billed via Coinbase’s x402 protocol. When payment is required, you receive:
HTTP/1.1 402 Payment Required
Content-Type: application/json

{
  "x402Version": 1,
  "accepts": [
    {
      "scheme": "exact",
      "network": "base-sepolia",
      "maxAmountRequired": "280000",
      "resource": "POST /extract/video",
      "description": "Horizon video transcription and OCR",
      "mimeType": "application/json",
      "payTo": "0xYourReceivingWallet",
      "maxTimeoutSeconds": 900,
      "asset": "0xYourUSDCContract",
      "extra": {
        "name": "USDC",
        "version": "1"
      }
    }
  ],
  "error": null
}
Forward the accepts payload to your facilitator, complete /verify and /settle, and retry the request with the Base64 token in X-PAYMENT. Horizon continues the job and returns settlement details in X-PAYMENT-RESPONSE.

Body

application/json

Provide either sourceUrl or file.

sourceUrl
string<uri>
sourceName
string
options
object

Extraction hints such as language, segmentLength, transcriptionModel, or sheet preferences depending on the endpoint.

webhookUrl
string<uri>

Webhook to call when the extraction completes.

file
file

Upload the raw file instead of providing sourceUrl.

Response

Extraction job accepted

jobId
string
required
Example:

"job_01hx9q9"

status
enum<string>
required
Available options:
queued,
processing,
completed,
failed
statusUrl
string<uri>
required

Canonical link to GET /jobs/{jobId} for this job.

jobType
string
required
Example:

"extract/pdf"

result
object | null

Present when the job completes synchronously.

etaSeconds
integer | null

Estimated seconds until completion.