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

# Query cached media for a connection

> Searches cached media by status, type, content type, duration, created date, cached date, cursor, and sort order.



## OpenAPI

````yaml https://api.ofauth.com/openapi.json get /v2/vault-plus/media
openapi: 3.1.0
info:
  title: OFAuth API
  version: 1.0.0
  description: >-
    OFAuth API including Account, Connections, Link, Access, Dynamic Rules,
    Vault+, and Realtime webhook contracts
  contact:
    email: support@ofauth.com
    url: https://ofauth.com/
servers:
  - url: https://api.ofauth.com
security:
  - ApiKey: []
tags:
  - name: Account
    description: Account management endpoints.
  - name: Connections
    description: Connection management endpoints.
  - name: Link
    description: Link authentication and session endpoints.
  - name: Access
    description: All Access related endpoints.
  - name: Analytics
    description: 'Access: charts, tops, and performance metrics.'
  - name: Earnings
    description: 'Access: earnings charts, transactions, and chargebacks.'
  - name: Messages
    description: 'Access: messaging, chats, queue, and mass messaging.'
  - name: Posts
    description: 'Access: create, edit, list, and manage posts.'
  - name: Promotions
    description: 'Access: promotions, trials, and bundles.'
  - name: Users
    description: 'Access: user profiles, subscriptions, and actions.'
  - name: Vault
    description: 'Access: vault folders, media, and management.'
  - name: Upload
    description: 'Access: media upload and processing.'
  - name: Self
    description: 'Access: authenticated account details and settings.'
  - name: Stories
    description: 'Access: stories listing and management.'
  - name: Subscriptions
    description: 'Access: subscription offers, discounts, and management.'
  - name: Realtime
    description: >-
      Realtime webhook delivery contracts, including relayed OnlyFans websocket
      events.
  - name: Dynamic Rules
    description: Dynamic signing rules operations.
  - name: Vault+
    description: Vault+ caching and management.
externalDocs:
  description: OFAuth Developer Documentation
  url: https://docs.ofauth.com
paths:
  /v2/vault-plus/media:
    get:
      tags:
        - Vault+ Media
      summary: Query cached media for a connection
      description: >-
        Searches cached media by status, type, content type, duration, created
        date, cached date, cursor, and sort order.
      parameters:
        - schema:
            type: string
            enum:
              - edge_only
              - pending
              - storing
              - stored
              - removed
            description: Filter by variant cache status.
          required: false
          name: status
          in: query
        - schema:
            type: string
            enum:
              - image
              - video
              - audio
            description: Filter by media type.
          required: false
          name: type
          in: query
        - schema:
            type: string
            description: Filter by exact cached variant MIME type.
            example: image/jpeg
          required: false
          name: contentType
          in: query
        - schema:
            type: number
            nullable: true
            description: Minimum media duration in seconds.
            example: 10
          required: false
          name: durationMin
          in: query
        - schema:
            type: number
            nullable: true
            description: Maximum media duration in seconds.
            example: 120
          required: false
          name: durationMax
          in: query
        - schema:
            type: string
            description: Include media first observed at or after this ISO 8601 date/time.
            example: '2026-06-01T00:00:00.000Z'
          required: false
          name: createdAtFrom
          in: query
        - schema:
            type: string
            description: Include media first observed at or before this ISO 8601 date/time.
            example: '2026-06-07T23:59:59.999Z'
          required: false
          name: createdAtTo
          in: query
        - schema:
            type: string
            description: Include media stored at or after this ISO 8601 date/time.
            example: '2026-06-01T00:00:00.000Z'
          required: false
          name: cachedAtFrom
          in: query
        - schema:
            type: string
            description: Include media stored at or before this ISO 8601 date/time.
            example: '2026-06-07T23:59:59.999Z'
          required: false
          name: cachedAtTo
          in: query
        - schema:
            type: number
            minimum: 1
            maximum: 100
            description: Maximum number of items to return. Defaults to 100.
            example: 25
          required: false
          name: limit
          in: query
        - schema:
            type: string
            description: Pagination cursor from the previous response.
            example: '100'
          required: false
          name: cursor
          in: query
        - schema:
            type: string
            enum:
              - createdAt_desc
              - createdAt_asc
              - cachedAt_desc
              - cachedAt_asc
              - duration_desc
              - duration_asc
            description: >-
              Sort order for scanned media queries. Direct cursor pagination is
              used when sort and date/duration filters are omitted.
          required: false
          name: sort
          in: query
        - schema:
            type: string
            minLength: 1
            description: Connection ID whose Vault+ cache should be read or modified.
            example: conn_v5bsqkzsjfk8cgr7hqbbw09t
          required: true
          name: x-connection-id
          in: header
      responses:
        '200':
          description: >-
            Matching cached media items with variants grouped by raw OnlyFans
            media ID.
          content:
            application/json:
              schema:
                type: object
                properties:
                  items:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                          description: >-
                            Raw OnlyFans media ID. Use this ID for Vault+ media
                            reads, batch reads, and deletes.
                          example: '4492994399'
                        type:
                          type: string
                          enum:
                            - image
                            - video
                            - audio
                          description: Media type inferred from the cached content type.
                          example: image
                        duration:
                          type: number
                          nullable: true
                          description: >-
                            Duration in seconds for video/audio media, or null
                            for images.
                          example: null
                        media:
                          type: object
                          additionalProperties:
                            type: object
                            properties:
                              status:
                                type: string
                                enum:
                                  - edge_only
                                  - pending
                                  - storing
                                  - stored
                                  - removed
                                description: >-
                                  Current cache lifecycle state for this media
                                  variant.
                                example: stored
                              quality:
                                type: string
                                description: >-
                                  Variant label or quality. Common values
                                  include full, thumb, 720, and 1080.
                                example: full
                              sizeBytes:
                                type: number
                                description: >-
                                  Stored byte size for this variant. May be 0
                                  before storage completes.
                                example: 1024000
                              contentType:
                                type: string
                                description: MIME type stored for this variant.
                                example: image/jpeg
                              accessCount:
                                type: number
                                description: >-
                                  Number of times this variant has been observed
                                  through media.ofauth.com.
                                example: 12
                              createdAt:
                                type: number
                                description: >-
                                  Unix timestamp in milliseconds when Vault+
                                  first observed this variant.
                                example: 1715800000000
                              expiresAt:
                                type: number
                                description: >-
                                  Unix timestamp in milliseconds when the
                                  upstream/proxy URL expires.
                                example: 1715886400000
                              storedAt:
                                type: number
                                nullable: true
                                description: >-
                                  Unix timestamp in milliseconds when persistent
                                  storage completed, or null while not stored.
                                example: 1715800100000
                              lastAccessedAt:
                                type: number
                                description: >-
                                  Unix timestamp in milliseconds when this
                                  variant was most recently observed.
                                example: 1715800500000
                              url:
                                type: string
                                description: media.ofauth.com URL that serves this variant.
                                example: >-
                                  https://media.ofauth.com/v2/example-signed-media-url
                            required:
                              - status
                              - quality
                              - sizeBytes
                              - contentType
                              - accessCount
                              - createdAt
                              - expiresAt
                              - storedAt
                              - lastAccessedAt
                              - url
                            description: >-
                              One stored or observed version of a media item.
                              Public responses key variants by label and do not
                              expose internal variant IDs.
                          description: >-
                            Stored variants keyed by public variant label. The
                            variant objects intentionally omit internal variant
                            IDs.
                      required:
                        - id
                        - type
                        - duration
                        - media
                      description: >-
                        A raw OnlyFans media item grouped with all cached
                        variants.
                    description: Matching cached media items.
                  nextCursor:
                    type: string
                    description: >-
                      Cursor for the next page. Omitted when there are no more
                      results.
                    example: '100'
                required:
                  - items
                description: Paginated Vault+ media query response.
              example:
                items:
                  - id: '4492994399'
                    type: image
                    duration: null
                    media:
                      full:
                        status: stored
                        quality: full
                        sizeBytes: 1024000
                        contentType: image/jpeg
                        accessCount: 12
                        createdAt: 1715800000000
                        expiresAt: 1715886400000
                        storedAt: 1715800100000
                        lastAccessedAt: 1715800500000
                        url: https://media.ofauth.com/v2/example-signed-media-url
                      thumb:
                        status: stored
                        quality: thumb
                        sizeBytes: 32000
                        contentType: image/jpeg
                        accessCount: 8
                        createdAt: 1715800000000
                        expiresAt: 1715886400000
                        storedAt: 1715800100000
                        lastAccessedAt: 1715800500000
                        url: >-
                          https://media.ofauth.com/v2/example-signed-thumbnail-url
                nextCursor: '100'
        '400':
          description: The x-connection-id header is missing or invalid.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: Human-readable error message.
                    example: Media not found
                required:
                  - error
                description: Error response.
              example:
                error: x-connection-id header is required
        '401':
          description: The API key is missing, invalid, or lacks the ACCOUNT scope.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: Human-readable error message.
                    example: Media not found
                required:
                  - error
                description: Error response.
              example:
                error: Unauthorized
      security:
        - ApiKey: []
components:
  securitySchemes:
    ApiKey:
      type: apiKey
      name: apiKey
      in: header
      description: >-
        Your OFAuth [API key](/quickstart#2-copy-your-api-key) for
        authenticating requests.

````