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

# Get multiple media items with all quality variants

> Returns cached media items for up to 100 media IDs. This route is registered before /:mediaId so batch is not treated as a media ID.



## OpenAPI

````yaml https://api.ofauth.com/openapi.json post /v2/vault-plus/media/batch
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/batch:
    post:
      tags:
        - Vault+ Media
      summary: Get multiple media items with all quality variants
      description: >-
        Returns cached media items for up to 100 media IDs. This route is
        registered before /:mediaId so batch is not treated as a media ID.
      parameters:
        - 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
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                mediaIds:
                  type: array
                  items:
                    type: string
                    description: Raw OnlyFans media ID.
                    example: '4492994399'
                  maxItems: 100
                  description: >-
                    Raw OnlyFans media IDs to fetch. Maximum 100 IDs per
                    request.
                  example:
                    - '4492994399'
                    - '4492994400'
              required:
                - mediaIds
              description: Batch media lookup request.
      responses:
        '200':
          description: >-
            Found media items with all cached variants. IDs that are not cached
            are omitted.
          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: >-
                      Found media items. Missing IDs are omitted from the
                      response.
                required:
                  - items
                description: Batch media lookup 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
        '400':
          description: >-
            The x-connection-id header is missing/invalid or the request body is
            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: mediaIds must contain 100 or fewer IDs
        '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.

````