Index YouTube
Index YouTube videos into a collection.
Three modes control how each video is processed and billed:
| mode | Behavior | Billing |
|---|---|---|
| transcript (default) | Fetches the caption track (auto-generated or manual), formats it with inline timestamps, and indexes it as text. No frames or audio are processed. | Basic text pages (roughly 3 credits for an hour of captions) |
| audio | Pulls the audio track through the multimodal audio pipeline (transcription plus audio understanding). | 5 credits per audio minute |
| video | Pulls the video through the multimodal video pipeline (frame descriptions plus transcription). | 20 credits per video minute |
The default is transcript and will stay transcript: media modes cost orders of magnitude more for the same video and are strictly opt-in.
A video with no captions fails in transcript mode by default. Set on_missing_transcript to audio or video to fall back to a media mode for that video instead. Because the fallback changes what you are billed, it is recorded per video: GET /v2/jobs/{job_id} returns a youtube array with mode_used, fell_back_from, transcript_available, and languages for every video in the job.
Accepts either a single url string or a urls array (max 20; duplicate videos are removed). Supported URL shapes: youtube.com/watch?v=, youtu.be/, youtube.com/shorts/, youtube.com/embed/, youtube.com/v/, and youtube.com/live/. Redirects and shortener URLs are not followed. Live streams are not indexable, and media longer than 4 hours is rejected.
Headers:
- Authorization: Bearer {api_key} - Captain API key for authentication
- X-Organization-ID: Organization UUID
- Idempotency-Key: UUID for request deduplication (optional)
Returns: { job_id, status: "pending" }
Path parameters
Headers
Request body
Response
Successful Response
Changes
No recorded changes to this endpoint across all 1 revision of this API.