> ## Documentation Index
> Fetch the complete documentation index at: https://haider-5d8ca6e7.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Extract transcript/text from a YouTube URL

> Runs the standard source ingest pipeline and saves a file record.
Clients typically send `extract: true` in the body for compatibility.




## OpenAPI

````yaml openapi.yaml post /source/v1/api/extract/youtube
openapi: 3.0.3
info:
  title: Skimming AI API
  version: 1.0.0
  description: >
    Build **PDF.ai / Chatbase-style** "chat with your content" experiences using
    a simple REST API.


    ## What you can do

    - Chat with PDFs, documents, spreadsheets, slides, images, audio, video,
    websites, and social posts

    - Parse documents into clean structured content

    - Extract transcripts/content from media and websites


    ## Authentication

    All requests require a Bearer token.


    **Header**

    `Authorization: Bearer YOUR_API_KEY`


    ## Base URL

    Use one of the servers below.


    ## Important Notes

    - **file_id is required**: You must first upload/source a file using
    `/source/v1/api/document` or `/source/v1/api/youtube` to get a `file_id`

    - **Streaming**: Chat endpoints support streaming responses (SSE format)
    when `streaming: true`


    ## Quick Start Guide


    **1. Get your API Key**

    - Generate an API key from your account dashboard

    - Use format: `Authorization: Bearer sk-your-api-key-here`


    **2. Ingest a file**

    ```

    POST /source/v1/api/document

    Authorization: Bearer sk-your-api-key

    Content-Type: multipart/form-data


    source: [your-file.pdf]

    ```

    Response contains `file_id` - save this!


    **3. Chat with the file**

    ```

    POST /chat/v1/api/document/pdf

    Authorization: Bearer sk-your-api-key

    Content-Type: application/json


    {
      "file_id": "your-file-id-from-step-2",
      "question": "What is this document about?",
      "streaming": false
    }

    ```


    **Required Headers for all requests:**

    - `Authorization: Bearer YOUR_API_KEY` (required)


    **Notes:**

    - Do **not** send `platform`, `userid`, `useremail` for API calls. The
    backend derives the user from your API key.
  contact:
    name: Skimming AI Support
    url: https://www.skimming.ai
    email: support@skimming.ai
  license:
    name: MIT
    url: https://opensource.org/licenses/MIT
servers:
  - url: https://app.skimming.ai/back
    description: Production
  - url: https://staging-app.skimming.ai/back
    description: Staging
security:
  - bearerAuth: []
tags:
  - name: Ingest
    description: >
      Upload and ingest files to get a `file_id` for chat operations.


      **Endpoints:**

      - `/source/v1/api/document` - Ingest documents (PDF, , CSV, EPUB, PPTX,
      TXT)

      - `/source/v1/api/image` - Ingest images (JPG, PNG, GIF, WebP, etc.)

      - `/source/v1/api/audio` - Ingest audio files (MP3, WAV, OGG, etc.)

      - `/source/v1/api/video` - Ingest video files (MP4, MOV, AVI, etc.)

      - `/source/v1/api/youtube` - Ingest YouTube videos

      - `/source/v1/api/website` - Ingest websites and social media posts


      **Returns:** `file_id` which is required for all chat operations.
  - name: Document
    description: |
      Chat with document files (PDF, Excel, PowerPoint, Text, EPUB).

      **Workflow:**
      1. Ingest document using `/source/v1/api/document`
      2. Get `file_id` from response
      3. Use appropriate `/chat/v1/api/document/:type` endpoint

      **Available Types:**
      - `pdf` - PDF files
      - `xlsx` - Excel/CSV files (.xlsx, .xls, .csv)
      - `pptx` - PowerPoint presentations (.pptx, .ppt)
      - `txt` - Text files (.txt, .rtf)
      - `epub` - EPUB files
  - name: Image
    description: |
      Chat with image files using AI-powered vision.

      **Workflow:**
      1. Ingest image using `/source/v1/api/image`
      2. Get `file_id` from response
      3. Use `/chat/v1/api/image/:type` endpoint

      **Available Types:**
      - `jpg` / `jpeg` - JPEG images
      - `png` - PNG images
      - `gif` - GIF images
      - `webp` - WebP images
      - `bmp` - BMP images
      - `tiff` - TIFF images
      - `svg` - SVG images
      - `heic` - HEIC images
  - name: Video
    description: |
      Chat with video content including YouTube videos.

      **Workflow for YouTube:**
      1. Ingest YouTube video using `/source/v1/api/youtube`
      2. Get `file_id` from response
      3. Use `/chat/v1/api/video/youtube` endpoint

      **Workflow for other videos:**
      1. Ingest video file using `/source/v1/api/video`
      2. Get `file_id` from response
      3. Use `/chat/v1/api/video/:type` endpoint

      **Available Types:**
      - `youtube` - YouTube videos
      - `mp4` - MP4 videos
      - `mov` - MOV videos
      - `avi` - AVI videos
      - `wmv` - WMV videos
      - `webm` - WebM videos
      - `flv` - FLV videos
      - `mkv` - MKV videos
  - name: Audio
    description: |
      Chat with audio files and transcripts.

      **Workflow:**
      1. Ingest audio using `/source/v1/api/audio`
      2. Get `file_id` from response
      3. Use `/chat/v1/api/audio/:type` endpoint

      **Available Types:**
      - `mp3` - MP3 audio
      - `wav` - WAV audio
      - `ogg` - OGG audio
      - `aac` - AAC audio
      - `flac` - FLAC audio
      - `m4a` - M4A audio
      - `webm` - WebM audio
  - name: Source
    description: |
      Chat with websites and social media posts.

      **Workflow:**
      1. Ingest URL using `/source/v1/api/website`
      2. Get `file_id` from response
      3. Use appropriate `/chat/v1/api/website/:type` endpoint

      **Available Types:**
      - `website` - General websites
      - `instagram` - Instagram posts
      - `twitter` - Twitter/X posts
      - `linkedin` - LinkedIn posts
      - `facebook` - Facebook posts
  - name: Parse
    description: |
      Parse content (no DB save). Returns extracted text + metadata.

      **Supported types:**
      - `document`, `image`, `video`, `audio` (multipart upload `source`)
      - `website`, `youtube` (JSON body `{ "source": "..." }`)
  - name: Extract
    description: |
      Extract text only (no DB save). Returns `textContent`.

      **Supported types:**
      - `document`, `image`, `video`, `audio` (multipart upload `source`)
      - `website`, `youtube` (JSON body `{ "source": "..." }`)
  - name: Usage
    description: >
      API usage and API plan totals for frontend dashboards.


      **Endpoints:**

      - `/users/api-count` - API monthly usage (counts)

      - `/users/api-plan-summary` - API plan totals only (questions/docs/hours
      per month)
paths:
  /source/v1/api/extract/youtube:
    post:
      tags:
        - Extract
      summary: Extract transcript/text from a YouTube URL
      description: |
        Runs the standard source ingest pipeline and saves a file record.
        Clients typically send `extract: true` in the body for compatibility.
      operationId: extractYoutube
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - source
              properties:
                extract:
                  type: boolean
                  default: true
                  description: Extract mode flag (accepted for client compatibility)
                source:
                  type: string
                  format: uri
                  description: YouTube URL
      responses:
        '200':
          description: File ingested successfully
          content:
            application/json:
              schema:
                $ref: d820328a-53ae-43bc-9db3-71a5ad3c60ec
        '401':
          $ref: '#/components/responses/Unauthorized'
components:
  responses:
    Unauthorized:
      description: Unauthorized - invalid or missing API key
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            success: false
            error: {}
            message:
              content: Invalid API key
              displayContent: true
  schemas:
    Error:
      type: object
      properties:
        success:
          type: boolean
          default: false
        error:
          type: object
          description: Error details
        message:
          type: object
          properties:
            content:
              type: string
              description: Error message
              example: Question limit exceeded!
            displayContent:
              type: boolean
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: APIKey
      description: Bearer token authentication using an API key

````