Primate Intelligence Videos API

The videos API from Primate Intelligence — 5 operation(s) for videos.

GitHub OpenAPI

Operations 7

POST /v1/videos Create a video (presigned upload or URL ingest) #
GET /v1/videos List videos (cursor pagination, created_at desc) #
POST /v1/videos/{id}/complete Signal that the presigned S3 PUT finished #
GET /v1/videos/{id} Fetch a video #
DELETE /v1/videos/{id} Delete a video (409 while analyses are non-terminal on it) #
GET /v1/videos/{id}/analyses List analyses for a video (result history) #
GET /v1/demo-videos Public sample videos with precomputed results (no auth) #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/primateintelligence-ai:primateintelligence-ai-videos-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

primateintelligence-ai-videos-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Primate Vision Videos API
  version: 1.0.0-alpha
  description: Public API v1 for Primate Vision — video understanding for the agentic web. P1 (PRI-430) publishes resource schemas; endpoints ship from P3 onward.
  contact:
    email: support@primateintelligence.ai
servers:
- url: https://api.primateintelligence.ai
  description: Production
- url: https://dev-api.primateintelligence.ai
  description: Development
tags:
- name: Videos
paths:
  /v1/videos:
    post:
      summary: Create a video (presigned upload or URL ingest)
      tags:
      - Videos
      security:
      - bearerAuth: []
      parameters:
      - name: Idempotency-Key
        in: header
        required: false
        schema:
          type: string
          minLength: 1
          maxLength: 255
        description: '§16.1: first request wins; 24h replay window; same key + different body → 409 idempotency_key_reused.'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateVideoRequest'
      responses:
        '201':
          description: Video created. Presigned mode → status awaiting_upload with upload instructions; URL mode → status processing (async fetch).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Video'
        '400':
          description: validation_failed / url_forbidden / prompt errors (§15)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
        '401':
          description: invalid_api_key / key_revoked / key_expired
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
        '404':
          description: resource_not_found (account-scoped; no existence oracle)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
        '409':
          description: resource_conflict / idempotency_key_reused / idempotency_unavailable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
        '429':
          description: rate_limit_exceeded / concurrency_limit_exceeded / quota_exceeded (always with Retry-After)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
      operationId: postV1Videos
      x-operation-id-source: derived
    get:
      summary: List videos (cursor pagination, created_at desc)
      tags:
      - Videos
      security:
      - bearerAuth: []
      parameters:
      - name: limit
        in: query
        schema:
          type: integer
          minimum: 1
          maximum: 100
          default: 20
      - name: starting_after
        in: query
        schema:
          type: string
        description: Cursor — mutually exclusive with ending_before.
      - name: ending_before
        in: query
        schema:
          type: string
      - name: status
        in: query
        schema:
          type: string
      - name: created_after
        in: query
        schema:
          type: string
          format: date-time
      - name: created_before
        in: query
        schema:
          type: string
          format: date-time
      responses:
        '200':
          description: List envelope (§13.4).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VideoList'
        '400':
          description: validation_failed / url_forbidden / prompt errors (§15)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
        '401':
          description: invalid_api_key / key_revoked / key_expired
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
        '404':
          description: resource_not_found (account-scoped; no existence oracle)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
        '409':
          description: resource_conflict / idempotency_key_reused / idempotency_unavailable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
        '429':
          description: rate_limit_exceeded / concurrency_limit_exceeded / quota_exceeded (always with Retry-After)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
      operationId: getV1Videos
      x-operation-id-source: derived
  /v1/videos/{id}/complete:
    post:
      summary: Signal that the presigned S3 PUT finished
      tags:
      - Videos
      security:
      - bearerAuth: []
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Size verified (±5% of declaration); video is ready.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Video'
        '400':
          description: validation_failed / url_forbidden / prompt errors (§15)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
        '401':
          description: invalid_api_key / key_revoked / key_expired
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
        '404':
          description: resource_not_found (account-scoped; no existence oracle)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
        '409':
          description: resource_conflict / idempotency_key_reused / idempotency_unavailable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
        '429':
          description: rate_limit_exceeded / concurrency_limit_exceeded / quota_exceeded (always with Retry-After)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
      operationId: postV1VideosByIdComplete
      x-operation-id-source: derived
  /v1/videos/{id}:
    get:
      summary: Fetch a video
      tags:
      - Videos
      security:
      - bearerAuth: []
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: The video.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Video'
        '400':
          description: validation_failed / url_forbidden / prompt errors (§15)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
        '401':
          description: invalid_api_key / key_revoked / key_expired
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
        '404':
          description: resource_not_found (account-scoped; no existence oracle)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
        '409':
          description: resource_conflict / idempotency_key_reused / idempotency_unavailable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
        '429':
          description: rate_limit_exceeded / concurrency_limit_exceeded / quota_exceeded (always with Retry-After)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
      operationId: getV1VideosById
      x-operation-id-source: derived
    delete:
      summary: Delete a video (409 while analyses are non-terminal on it)
      tags:
      - Videos
      security:
      - bearerAuth: []
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Deleted.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DeletedVideo'
        '400':
          description: validation_failed / url_forbidden / prompt errors (§15)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
        '401':
          description: invalid_api_key / key_revoked / key_expired
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
        '404':
          description: resource_not_found (account-scoped; no existence oracle)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
        '409':
          description: resource_conflict / idempotency_key_reused / idempotency_unavailable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
        '429':
          description: rate_limit_exceeded / concurrency_limit_exceeded / quota_exceeded (always with Retry-After)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
      operationId: deleteV1VideosById
      x-operation-id-source: derived
  /v1/videos/{id}/analyses:
    get:
      summary: List analyses for a video (result history)
      description: 'PRI-496: resource-nested spelling of GET /v1/analyses?video_id={id}. Same list envelope, same filters (status, limit, starting_after), ordered created_at desc. Use it to rebuild a video''s full analysis/session history.'
      tags:
      - Videos
      security:
      - bearerAuth: []
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
      - name: limit
        in: query
        schema:
          type: integer
          minimum: 1
          maximum: 100
          default: 20
      - name: starting_after
        in: query
        schema:
          type: string
        description: Cursor — mutually exclusive with ending_before.
      - name: ending_before
        in: query
        schema:
          type: string
      - name: status
        in: query
        schema:
          type: string
      - name: created_after
        in: query
        schema:
          type: string
          format: date-time
      - name: created_before
        in: query
        schema:
          type: string
          format: date-time
      responses:
        '200':
          description: List envelope of analyses referencing this video (§13.4).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AnalysisList'
        '400':
          description: validation_failed / url_forbidden / prompt errors (§15)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
        '401':
          description: invalid_api_key / key_revoked / key_expired
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
        '404':
          description: resource_not_found (account-scoped; no existence oracle)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
        '409':
          description: resource_conflict / idempotency_key_reused / idempotency_unavailable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
        '429':
          description: rate_limit_exceeded / concurrency_limit_exceeded / quota_exceeded (always with Retry-After)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
      operationId: getV1VideosByIdAnalyses
      x-operation-id-source: derived
  /v1/demo-videos:
    get:
      summary: Public sample videos with precomputed results (no auth)
      description: 'PRI-496 GAP-8: onboarding samples — curated videos with precomputed answers for a set of example prompts. Unauthenticated. Use these to see real result shapes before uploading your own video. The documented subset above is the stable contract; extra fields may appear and change without notice.'
      tags:
      - Videos
      responses:
        '200':
          description: Sample videos.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DemoVideoList'
      operationId: getV1DemoVideos
      x-operation-id-source: derived
components:
  schemas:
    ErrorEnvelope:
      type: object
      properties:
        error:
          allOf:
          - $ref: '#/components/schemas/ErrorObject'
          - type: object
            properties:
              status:
                type: integer
            required:
            - status
      required:
      - error
    CreateVideoRequest:
      type: object
      properties:
        filename:
          type: string
          maxLength: 255
        content_type:
          type: string
          enum:
          - video/mp4
          - video/quicktime
          description: Required in presigned mode.
        size_bytes:
          type: integer
          minimum: 1
          maximum: 2147483648
        url:
          type: string
          maxLength: 2048
          format: uri
          description: 'URL-ingest mode: https-only, SSRF-guarded (§18.2). Mutually exclusive with filename/size_bytes.'
        metadata:
          type: object
          additionalProperties:
            type: string
            maxLength: 500
          description: Free-form key/value metadata. ≤16 keys, key ≤40 chars [a-zA-Z0-9_.-], value ≤500 chars.
      description: 'Exactly one mode: presigned ({filename?, content_type, size_bytes?}) or ingest ({url}). Unknown fields are rejected.'
    Narrative:
      type:
      - object
      - 'null'
      properties:
        status:
          type: string
          enum:
          - generating
          - ready
          - failed
        entries:
          type: array
          items:
            type: object
            properties:
              t_s:
                type: number
              text:
                type: string
            required:
            - t_s
            - text
      required:
      - status
      - entries
    Progress:
      type:
      - object
      - 'null'
      properties:
        stage:
          type: string
        percent:
          type: number
          minimum: 0
          maximum: 100
      required:
      - stage
      - percent
      description: Non-terminal only. percent is monotonic non-decreasing per analysis.
    Artifacts:
      type:
      - object
      - 'null'
      properties:
        annotated_video_url:
          type: string
          format: uri
        expires_at:
          type: string
          format: date-time
          example: '2026-07-08T14:00:00Z'
      required:
      - annotated_video_url
      - expires_at
      description: Signed URL TTL 1h; re-fetch GET analysis for a fresh URL.
    DemoVideoResult:
      type: object
      properties:
        answer:
          type:
          - string
          - 'null'
        confidence:
          type:
          - number
          - 'null'
        query_type:
          type:
          - string
          - 'null'
        video_url:
          type:
          - string
          - 'null'
          description: Playable annotated result video (CDN).
        computed_at:
          type: string
      required:
      - answer
      - confidence
      - query_type
      - video_url
      - computed_at
      description: Precomputed result for one prompt. Documented subset — additional fields (result_json, clips) exist but are undocumented and may change.
    Video:
      type: object
      properties:
        id:
          type: string
          pattern: ^video_[0-9A-HJKMNP-TV-Z]{26}$
          description: Video resource id (prefixed ULID). Immutable.
          example: video_01KX12XX3BNM688AWHX7406HCF
        object:
          type: string
          enum:
          - video
        livemode:
          type: boolean
          description: true when the request used a live key; false for test keys and sandbox. Stripe-style.
        status:
          $ref: '#/components/schemas/VideoStatus'
        filename:
          type:
          - string
          - 'null'
          maxLength: 255
        size_bytes:
          type:
          - integer
          - 'null'
          minimum: 1
          maximum: 2147483648
        duration_s:
          type:
          - number
          - 'null'
          exclusiveMinimum: 0
        width:
          type:
          - integer
          - 'null'
        height:
          type:
          - integer
          - 'null'
        fps:
          type:
          - number
          - 'null'
        content_type:
          type: string
          enum:
          - video/mp4
          - video/quicktime
        source:
          type: string
          enum:
          - upload
          - url
        upload:
          $ref: '#/components/schemas/VideoUpload'
        media:
          $ref: '#/components/schemas/VideoMedia'
        error:
          $ref: '#/components/schemas/ErrorObject'
        metadata:
          type: object
          additionalProperties:
            type: string
            maxLength: 500
          default: {}
          description: Free-form key/value metadata. ≤16 keys, key ≤40 chars [a-zA-Z0-9_.-], value ≤500 chars.
        expires_at:
          type:
          - string
          - 'null'
          format: date-time
          example: '2026-07-08T14:00:00Z'
        created_at:
          type: string
          format: date-time
          example: '2026-07-08T14:00:00Z'
      required:
      - id
      - object
      - livemode
      - status
      - filename
      - size_bytes
      - duration_s
      - width
      - height
      - fps
      - content_type
      - source
      - upload
      - error
      - expires_at
      - created_at
      description: A source video (§13.1).
    DemoVideo:
      type: object
      properties:
        id:
          type: string
        display_name:
          type: string
        duration_seconds:
          type:
          - number
          - 'null'
        thumbnail_url:
          type:
          - string
          - 'null'
        results_by_prompt:
          type: object
          additionalProperties:
            $ref: '#/components/schemas/DemoVideoResult'
          description: Map of prompt text → precomputed result.
      required:
      - id
      - display_name
      - duration_seconds
      - thumbnail_url
      - results_by_prompt
    AnalysisUsage:
      type:
      - object
      - 'null'
      properties:
        billed_seconds:
          type: integer
          minimum: 0
        credit_balance_after:
          type:
          - integer
          - 'null'
        metering_rule:
          allOf:
          - $ref: '#/components/schemas/MeteringRule'
          - description: 'PRI-552: the rule this analysis settled under. Mirrors the top-level metering_rule for a self-contained terminal summary.'
        frames:
          type:
          - integer
          - 'null'
          minimum: 0
          description: 'PRI-552: processed-frame count reported by the inference callback (cost telemetry). Present for both metering rules when available; null when the callback did not carry it.'
      required:
      - billed_seconds
      - credit_balance_after
      description: Terminal only. credit_balance_after is the balance immediately after THIS analysis settled — an immutable point-in-time snapshot; it does not change as later analyses run. Null when the account row is unavailable (e.g. free-grant exhausted before settlement). billed_seconds is the settled ledger amount, derived from the processed-frame count for per_frame rows (PRI-552); historical per_second rows carry their original clock-derived amount.
    DemoVideoList:
      type: object
      properties:
        videos:
          type: array
          items:
            $ref: '#/components/schemas/DemoVideo'
      required:
      - videos
    ErrorObject:
      type:
      - object
      - 'null'
      properties:
        code:
          type: string
          example: video_unreadable
        message:
          type: string
      required:
      - code
      - message
    Clip:
      type: object
      properties:
        start_s:
          type: number
          minimum: 0
        end_s:
          type: number
        confidence:
          type: number
          minimum: 0
          maximum: 1
        terms:
          type: object
          additionalProperties:
            type: number
            minimum: 0
            maximum: 1
      required:
      - start_s
      - end_s
      - confidence
      - terms
    Analysis:
      type: object
      properties:
        id:
          type: string
          pattern: ^an_[0-9A-HJKMNP-TV-Z]{26}$
          description: Analysis resource id (prefixed ULID).
          example: an_01KX12XX3BNM688AWHX7406HCF
        object:
          type: string
          enum:
          - analysis
        livemode:
          type: boolean
          description: true when the request used a live key; false for test keys and sandbox. Stripe-style.
        origin:
          type: string
          enum:
          - api
          - console
          - system
          description: '`api` — submitted via the public API; `console` — uploaded via the dashboard; `system` — generated internally (e.g. auto-probe, fixture seeding, run_prompt). System analyses are never billed. Agents should normally only process api/console-origin analyses. (Renamed 2026-07-27: former value `user` is now `api`.)'
        status:
          $ref: '#/components/schemas/AnalysisStatus'
        video_id:
          type: string
          pattern: ^video_[0-9A-HJKMNP-TV-Z]{26}$
          description: Video resource id (prefixed ULID). Immutable.
          example: video_01KX12XX3BNM688AWHX7406HCF
        prompt:
          type:
          - string
          - 'null'
          minLength: 1
          maxLength: 2000
        query:
          type: object
          additionalProperties: {}
          description: CompiledQuery (schema at /v1/schemas/compiled-query.json). Always populated in responses.
        parse_mode:
          type:
          - string
          - 'null'
          enum:
          - llm
          - heuristic
          - client
        model:
          type: string
          example: Darwin-preview-1.3B
        options:
          type: object
          properties:
            narrative:
              type: boolean
              default: false
        progress:
          $ref: '#/components/schemas/Progress'
        queue_position:
          type:
          - integer
          - 'null'
          minimum: 1
        result:
          $ref: '#/components/schemas/Result'
        narrative:
          $ref: '#/components/schemas/Narrative'
        artifacts:
          $ref: '#/components/schemas/Artifacts'
        error:
          $ref: '#/components/schemas/ErrorObject'
        metering_rule:
          $ref: '#/components/schemas/MeteringRule'
        usage:
          $ref: '#/components/schemas/AnalysisUsage'
        rerun_eligible:
          type: boolean
          description: 'PRI-493: present on failed analyses — true when this analysis qualifies for ONE free re-run (it failed during a platform incident, or was flagged by ops). POST /v1/analyses/{id}/rerun creates a fresh analysis at no charge. Absent on non-failed analyses.'
        metadata:
          type: object
          additionalProperties:
            type: string
            maxLength: 500
          default: {}
          description: Free-form key/value metadata. ≤16 keys, key ≤40 chars [a-zA-Z0-9_.-], value ≤500 chars.
        created_at:
          type: string
          format: date-time
          example: '2026-07-08T14:00:00Z'
        started_at:
          type:
          - string
          - 'null'
          format: date-time
          example: '2026-07-08T14:00:00Z'
        completed_at:
          type:
          - string
          - 'null'
          format: date-time
          example: '2026-07-08T14:00:00Z'
      required:
      - id
      - object
      - livemode
      - origin
      - status
      - video_id
      - prompt
      - query
      - parse_mode
      - model
      - options
      - progress
      - queue_position
      - result
      - narrative
      - artifacts
      - error
      - usage
      - created_at
      - started_at
      - completed_at
      description: A video analysis (§13.2).
    AnalysisList:
      type: object
      properties:
        object:
          type: string
          enum:
          - list
        data:
          type: array
          items:
            $ref: '#/components/schemas/Analysis'
        has_more:
          type: boolean
      required:
      - object
      - data
      - has_more
    AnalysisStatus:
      type: string
      enum:
      - queued
      - preparing
      - analyzing
      - rendering
      - completed
      - failed
      - canceled
      description: Analysis lifecycle state (§14.2). Clients MUST tolerate unknown future non-terminal values.
    MeteringRule:
      type: string
      enum:
      - per_second
      - per_frame
      description: 'PRI-552: settlement rule pinned at admission. Resources created before the cutover report per_second.'
    DeletedVideo:
      type: object
      properties:
        id:
          type: string
          pattern: ^video_[0-9A-HJKMNP-TV-Z]{26}$
          description: Video resource id (prefixed ULID). Immutable.
          example: video_01KX12XX3BNM688AWHX7406HCF
        object:
          type: string
          enum:
          - video
        deleted:
          type: boolean
          enum:
          - true
      required:
      - id
      - object
      - deleted
    VideoList:
      type: object
      properties:
        object:
          type: string
          enum:
          - list
        data:
          type: array
          items:
            $ref: '#/components/schemas/Video'
        has_more:
          type: boolean
      required:
      - object
      - data
      - has_more
    Result:
      type:
      - object
      - 'null'
      properties:
        answer:
          type: string
          enum:
          - 'yes'
          - 'no'
          - indeterminate
        confidence:
          type: number
          minimum: 0
          maximum: 1
        clips:
          type: array
          items:
            $ref: '#/components/schemas/Clip'
          maxItems: 500
        term_confidences:
          type: object
          additionalProperties:
            type: number
            minimum: 0
            maximum: 1
        query_type:
          type: string
          enum:
          - object
          - action
          - compound
          - attribute
          - open_ended
        video_duration_s:
          type:
          - number
          - 'null'
          exclusiveMinimum: 0
        detected_count:
          type:
          - integer
          - 'null'
          minimum: 0
        indeterminate_reason:
          type:
          - string
          - 'null'
          enum:
          - low_confidence
          - nothing_detected
          - unsupported_query_form
          - duration_mismatch
          - unsupported_action_term
        unsupported_action:
          type: object
          properties:
            reason:
              type: string
              description: Why the request could not be scored.
              example: unsupported_query_form
            docs_url:
              type: string
              description: The supported-actions capability list — what the model can and cannot detect.
              example: https://primateintelligence.ai/docs/supported-actions
          required:
          - reason
          - docs_url
          description: 'PRI-516: present only when the prompt requested something the model cannot detect/score. Absent otherwise — never null.'
      required:
      - answer
      - confidence
      - clips
      - term_confidences
      - query_type
      - video_duration_s
      description: 'Analysis result — the product (§13.3). Reserved (always absent in v1): masks, bounding_boxes, events.'
    VideoUpload:
      type:
      - object
      - 'null'
      properties:
        method:
          type: string
          enum:
          - PUT
        url:
          type: string
          format: uri
        headers:
          type: object
          additionalProperties:
            type: string
        expires_at:
          type: string
          format: date-time
          example: '2026-07-08T14:00:00Z'
      required:
      - method
      - url
      - headers
      - expires_at
      description: Presigned upload instructions. Present only while awaiting_upload. URL TTL 1h.
    VideoMedia:
      type:
      - object
      - 'null'
      properties:
        url:
          type: string
          format: uri
        expires_at:
          type: string
          format: date-time
          example: '2026-07-08T14:00:00Z'
      required:
      - url
      - expires_at
      description: Signed 1h playback URL for the source video (sign-on-read — re-fetch for a fresh URL). Null while not ready or when no stored source object exists.
    VideoStatus:
      type: string
      enum:
      - awaiting_upload
      - processing
      - ready
      - failed
      description: Video lifecycle state (§14.1).
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: API key (pv_live_… / pv_test_…). Clerk session JWTs are accepted on the same endpoints for first-party clients.