> ## Documentation Index
> Fetch the complete documentation index at: https://docs.pagepith.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Process a video

> Queue transcript and metadata processing for a public social video.



## OpenAPI

````yaml POST /v1/api/video/process
openapi: 3.1.0
info:
  title: PagePith API
  version: 0.1.0
  description: >-
    Turn any web page into clean, structured content. The API handles
    JavaScript-rendered sites, PDFs, and most bot-protected pages, returning
    readable markdown. Authenticate with your API key as a Bearer token. Usage
    is billed per successful scrape.
servers:
  - url: https://api.pagepith.com
    description: Production
security:
  - bearerAuth: []
tags:
  - name: Scrape
    description: Fetch and convert web pages
  - name: Video
    description: Transcribe public YouTube, Instagram, and TikTok videos
  - name: Monitoring
    description: Watch public pages for content changes
  - name: Blog
    description: Read published PagePith engineering articles
paths:
  /v1/api/video/process:
    post:
      tags:
        - Video
      summary: Queue video processing
      description: >-
        Queue transcript and metadata processing for a public YouTube,
        Instagram, or TikTok video. Native captions cost one credit; generated
        transcripts cost four credits per rounded-up audio minute.
      operationId: processVideo
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/VideoProcessRequest'
            example:
              url: https://www.youtube.com/watch?v=dQw4w9WgXcQ
              mode: auto
              language: en
      responses:
        '202':
          description: Video job accepted.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VideoJobAccepted'
        '400':
          $ref: '#/components/responses/InvalidRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '402':
          $ref: '#/components/responses/PaymentRequired'
components:
  schemas:
    VideoProcessRequest:
      type: object
      required:
        - url
      properties:
        url:
          type: string
          format: uri
        mode:
          type: string
          enum:
            - auto
            - native
            - generate
          default: auto
        language:
          type: string
          description: Preferred ISO 639-1 language.
        forceFresh:
          type: boolean
        callbackUrl:
          type: string
          format: uri
        callbackToken:
          type: string
          maxLength: 256
    VideoJobAccepted:
      type: object
      required:
        - jobId
        - status
      properties:
        jobId:
          type: string
        status:
          type: string
          const: queued
  responses:
    InvalidRequest:
      description: The request body failed validation.
      content:
        application/json:
          schema:
            type: object
            properties:
              error:
                type: string
                enum:
                  - invalid_request
              details:
                type: object
    Unauthorized:
      description: Missing or invalid API key.
      content:
        application/json:
          schema:
            type: object
            properties:
              error:
                type: string
                enum:
                  - unauthorized
              message:
                type: string
    PaymentRequired:
      description: No active subscription or usage allowance remaining.
      content:
        application/json:
          schema:
            type: object
            properties:
              error:
                type: string
                enum:
                  - payment_required
              message:
                type: string
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: 'Your API key as a Bearer token: `Authorization: Bearer <api-key>`.'

````