> ## 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.

# Chat with an Instagram post

> Ask questions about an Instagram post using its `file_id`.

**Workflow:**
1. Ingest Instagram URL using `/source/v1/api/website` with JSON body containing `url`
2. Use returned `file_id` with this endpoint




## OpenAPI

````yaml openapi.yaml post /chat/v1/api/website/instagram
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:
  /chat/v1/api/website/instagram:
    post:
      tags:
        - Source
      summary: Chat with an Instagram post
      description: >
        Ask questions about an Instagram post using its `file_id`.


        **Workflow:**

        1. Ingest Instagram URL using `/source/v1/api/website` with JSON body
        containing `url`

        2. Use returned `file_id` with this endpoint
      operationId: chatWithInstagram
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ChatRequest'
            examples:
              example:
                summary: Chat with Instagram post
                value:
                  file_id: abc123-def456-ghi789
                  question: What is this post about?
                  streaming: false
      responses:
        '200':
          $ref: '#/components/responses/ChatOK'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '402':
          description: Question limit exceeded
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    ChatRequest:
      type: object
      additionalProperties: false
      required:
        - file_id
        - question
      properties:
        file_id:
          type: string
          description: The file_id returned from ingest endpoint
          example: abc123-def456-ghi789
        question:
          type: string
          description: Your question about the content
          example: What are the main points discussed in this document?
        streaming:
          type: boolean
          default: true
          description: Whether to stream the response (SSE format)
        model:
          type: string
          default: gpt-4
          description: AI model to use
          enum:
            - gpt-4
            - gpt-4o
            - gpt-4o-mini
            - gpt-3.5-turbo
            - claude-3-opus
            - claude-3-sonnet
            - claude-3.5-sonnet
            - gemini-1.5-pro
            - gemini-1.5-flash
          example: gpt-4
        model_type:
          type: string
          default: openai
          description: Model provider
          enum:
            - openai
            - anthropic
            - gemini
          example: openai
        conversation_type:
          type: string
          enum:
            - single
            - group
          default: single
          description: Type of conversation
        max_output:
          type: integer
          description: Maximum output tokens
          example: 2000
    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
    ChatResponse:
      type: object
      properties:
        success:
          oneOf:
            - type: boolean
            - type: string
          description: Response content or success status
        data:
          type: string
          description: The AI-generated answer (when non-streaming)
          example: The main points discussed in this content are...
        error:
          type: object
          nullable: true
          description: Error details if any
        message:
          type: object
          properties:
            content:
              type: string
              nullable: true
            displayContent:
              type: boolean
  responses:
    ChatOK:
      description: Successful response
      content:
        text/event-stream:
          schema:
            type: string
            description: Server-Sent Events stream (when streaming=true)
        application/json:
          schema:
            $ref: '#/components/schemas/ChatResponse'
          examples:
            non_streaming:
              summary: Non-streaming response
              value:
                success: true
                data: The main points discussed in this content are...
                error: null
                message:
                  content: null
                  displayContent: true
    BadRequest:
      description: Bad request - invalid parameters
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            success: false
            error: {}
            message:
              content: Invalid request parameters
              displayContent: true
    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
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: APIKey
      description: Bearer token authentication using an API key

````