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

# Start a VOD scan

> Queues an ahead-of-time scan (one runs at a time). Poll `GET /v1/vod/scans/{scan_id}` or listen for `vod.scan.*` events. With `asset_id`, read the analysis from `result_url` when done; no output manifest is generated. Legacy URL scans can also return `output_hls_url`.



## OpenAPI

````yaml reference/openapi.json POST /v1/vod/scans
openapi: 3.1.0
info:
  title: Interactive Layers Context API
  description: >

    Interactive Layers reads what is said on your channel and turns it into ad
    signals.


    * **Signal mode** (`mode=signal`): your program is untouched; every break of
    the output manifest carries an
      `EXT-X-DATERANGE CLASS="com.interactivelayers.signal"` with the matching campaign ids, keywords, your external ids
      (e.g. SpringServe) and a brand-safety status, so your ad server can target the break.
    * **Live SSAI** (`mode=ssai`): supported live pipelines can stitch ads and
    in-band supers.

    * **Legacy URL scan**: enriched VOD manifest with signals; `ssai` adds
    supers. No ad segment replacement.

    * **Asset analysis and operations**: saved moments, campaign previews and
    airing/playback notifications.
      GAM profiles use client-side VAST/IMA. SpringServe profiles produce revision-bound SSAI signals;
      the OTTera transport remains pending external validation. Campaign synchronization is read-only.

    Authenticate with the `X-API-Key` header (keys are issued by Interactive
    Layers). Errors are `{"detail": "..."}`.

    Events can be polled (`GET /v1/events`) or pushed to a signed webhook (`PUT
    /v1/keys/me/webhook`).

    Content catalog and batch operations use their own scoped server key in
    `Authorization: Bearer …`.
  version: '1.2'
servers:
  - url: https://console.interactivelayers.com
security: []
tags:
  - name: AdRouter
    description: Advertising routing, simulation, delivery and reports per project.
  - name: Advertising providers
    description: >-
      GAM and SpringServe connections, profiles and read-only campaign
      synchronization.
  - name: Keys
    description: The calling API key and its signed webhook.
  - name: Campaigns
    description: >-
      Signal campaigns: categories, keywords and the external ids written into
      break markers when the context matches.
  - name: Sources
    description: >-
      Realtime sources (HLS or YouTube) in `signal` or `ssai` mode and their
      enriched output manifest.
  - name: Events
    description: 'Events of your sources: opportunities, break signals, brand-safety holds.'
  - name: Assets
    description: >-
      Create, list, retrieve, rename and delete private video assets. Use
      asset_id as the input to a VOD analysis.
  - name: VOD operations
    description: >-
      Evaluate campaigns from saved asset analyses, schedule airings and send
      playback notifications.
  - name: VOD
    description: >-
      Ahead-of-time VOD scans, faster than real time: transcript, opportunities,
      brand-safety holds, a targeting signal per break and the enriched VOD
      manifest.
paths:
  /v1/vod/scans:
    post:
      tags:
        - VOD
      summary: Start a VOD scan
      description: >-
        Queues an ahead-of-time scan (one runs at a time). Poll `GET
        /v1/vod/scans/{scan_id}` or listen for `vod.scan.*` events. With
        `asset_id`, read the analysis from `result_url` when done; no output
        manifest is generated. Legacy URL scans can also return
        `output_hls_url`.
      operationId: create_v1_vod_scans_post
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ScanIn'
      responses:
        '202':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ScanOut'
        '401':
          description: Missing, invalid or revoked API key
        '403':
          description: The API key lacks the required scope
        '422':
          description: Invalid source
      security:
        - APIKeyHeader: []
components:
  schemas:
    ScanIn:
      properties:
        asset_id:
          anyOf:
            - type: string
              maxLength: 80
              minLength: 1
            - type: 'null'
          title: Asset Id
          description: >-
            Owned asset ID. Produces an analysis-only scan with no output
            manifest.
        topics:
          anyOf:
            - items:
                type: string
              type: array
              maxItems: 30
              minItems: 1
            - type: 'null'
          title: Topics
          description: Analysis topics for asset_id. Defaults to the owner's topics.
        hls_url:
          anyOf:
            - type: string
              maxLength: 2048
            - type: 'null'
          title: Hls Url
          description: VOD HLS media playlist (https, with `#EXT-X-ENDLIST`, MPEG-TS).
        mp4_url:
          anyOf:
            - type: string
              maxLength: 2048
            - type: 'null'
          title: Mp4 Url
          description: Progressive MP4 (https).
        youtube_url:
          anyOf:
            - type: string
              maxLength: 300
            - type: 'null'
          title: Youtube Url
          description: YouTube video (not a live).
        cue_points:
          items:
            type: number
          type: array
          maxItems: 200
          title: Cue Points
          description: >-
            Break start times in seconds from the start of the VOD. Merged with
            the origin's own CUE-OUT/DATERANGE breaks.
        break_interval_seconds:
          anyOf:
            - type: integer
              maximum: 3600
              minimum: 30
            - type: 'null'
          title: Break Interval Seconds
          description: >-
            When the VOD has no breaks (origin or cue_points): Interactive
            Layers proposes one every N seconds (multiple of 30), moved out of
            brand-safety holds.
        mode:
          type: string
          enum:
            - signal
            - ssai
          title: Mode
          description: >-
            `signal`: markers only. `ssai`: markers + in-band supers (ad segment
            replacement is not available for VOD in v1).
          default: signal
        marker_profile:
          type: string
          enum:
            - interactivelayers
            - interactivelayers_cue
            - ottera
            - clipma
            - clipma_cue
          title: Marker Profile
          description: >-
            Break marker profile (see Sources). `clipma` and `clipma_cue` are
            deprecated aliases of `interactivelayers` and
            `interactivelayers_cue`.
          default: interactivelayers
        campaign_ids:
          anyOf:
            - items:
                type: string
              type: array
              maxItems: 50
            - type: 'null'
          title: Campaign Ids
          description: 'Restrict the scan to these campaigns (default: all of yours).'
      type: object
      title: ScanIn
      examples:
        - campaign_ids:
            - acme-hydration
          cue_points:
            - 600
            - 1200
          hls_url: https://cdn.example.com/vod/episode-12/index.m3u8
          mode: signal
        - asset_id: asset-0123456789abcdef0123456789abcdef
          topics:
            - deportes
            - viajes
    ScanOut:
      properties:
        scan_id:
          type: string
          title: Scan Id
        status:
          type: string
          enum:
            - queued
            - downloading
            - transcribing
            - analyzing
            - rendering
            - done
            - failed
            - cancelled
          title: Status
        progress:
          $ref: '#/components/schemas/Progress'
        error:
          anyOf:
            - type: string
            - type: 'null'
          title: Error
        duration_seconds:
          anyOf:
            - type: number
            - type: 'null'
          title: Duration Seconds
        source:
          additionalProperties:
            type: string
          type: object
          title: Source
        mode:
          type: string
          title: Mode
        output_hls_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Output Hls Url
          description: Enriched VOD manifest; set only when `done`.
        result_url:
          type: string
          title: Result Url
        created_at:
          type: string
          title: Created At
        started_at:
          anyOf:
            - type: string
            - type: 'null'
          title: Started At
        finished_at:
          anyOf:
            - type: string
            - type: 'null'
          title: Finished At
        links:
          additionalProperties:
            type: string
          type: object
          title: Links
      type: object
      required:
        - scan_id
        - status
        - progress
        - source
        - mode
        - result_url
        - created_at
        - links
      title: ScanOut
    Progress:
      properties:
        percent:
          type: number
          title: Percent
          default: 0
        stage:
          anyOf:
            - type: string
            - type: 'null'
          title: Stage
        detail:
          anyOf:
            - type: string
            - type: 'null'
          title: Detail
      type: object
      title: Progress
  securitySchemes:
    APIKeyHeader:
      type: apiKey
      description: >-
        Partner API key (`ck_…`). Created by Interactive Layers; shown only
        once.
      in: header
      name: X-API-Key

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.