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

# Upload Media to Vault (/api-reference/fansly/vault/upload-media-to-vault)

Upload a file straight into the Fansly Vault. Provide either `file` or `file_url`. Credits are charged per megabyte uploaded.

Leave `album_id` out to store the media in the account's default vault album (what the Fansly Dashboard shows when you open the Vault), or pass one to store it in a specific album — Fansly's built-in albums as well as your own. **Refer to our List Vault Albums endpoint** to look up album IDs.

The response also carries the reusable `fansly_media_` handle, so vault media can be attached to chat messages and posts without re-uploading it.

## OpenAPI

````yaml https://app.onlyfansapi.com/scribe-fansly-docs/openapi.yaml post /api/fansly/{fanslyAccount}/vault/media/upload
openapi: 3.0.3
info:
  title: Fansly API Documentation
  description: ""
  version: 1.0.0
servers:
  - url: https://app.onlyfansapi.com
security:
  - default: []
tags:
  - name: Account
    description: Endpoints for your linked Fansly accounts
  - name: Chat Messages
    description: Endpoints for Fansly chats (messaging groups)
  - name: Chats
    description: Endpoints for Fansly chats (messaging groups)
  - name: Connect Fansly Account
    description: ""
  - name: Earnings
    description: Endpoints for Fansly Earnings — wallets, balances, transactions,
      payouts, and statements.
  - name: Followers
    description: Endpoints for Fansly followers.
  - name: Following
    description: Endpoints for the accounts a Fansly Account is following.
  - name: Lists
    description: Endpoints for Fansly subscriber/fan lists (e.g. "VIP", "Spenders").
  - name: Mass Messaging
    description: Endpoints for Fansly mass messages (broadcasts) — send one message
      to many recipients at once, and manage scheduled broadcasts.
  - name: Media
    description: Upload media for use in Fansly posts and messages
  - name: Posts
    description: Endpoints for Fansly wall posts.
  - name: Profile Statistics
    description: Endpoints for Fansly Profile Statistics (viewer engagement insights).
  - name: Subscribers
    description: Endpoints for Fansly subscribers and subscription tiers.
  - name: Subscription Discounts
    description: Endpoints for Fansly subscription discounts (shown as "Gift Links"
      in the Fansly Dashboard).
  - name: Top Supporters
    description: Endpoints for the Fansly "Top Supporters" view — see who spends the
      most and what they spend on.
  - name: Tracking Links
    description: Endpoints for Fansly tracking links — per-source attribution links
      (e.g. "Twitter bio", "FYP", "Search").
  - name: Users
    description: APIs for fetching Fansly users
  - name: Vault
    description: Endpoints for the Fansly Vault — the account's media library and
      the albums it is organised into.
  - name: Walls
    description: Endpoints for Fansly walls — the tabbed feeds on a creator profile
      that posts are published to.
paths:
  /api/fansly/{fanslyAccount}/vault/media/upload:
    parameters:
      - in: path
        name: fanslyAccount
        description: The Fansly Account ID
        example: fansly_acct_XXXXXXXXXXXXXXX
        required: true
        schema:
          type: string
    post:
      summary: Upload Media to Vault
      operationId: uploadMediaToVault
      description: >-
        Upload a file straight into the Fansly Vault. Provide either `file` or
        `file_url`. Credits are charged per megabyte uploaded.


        Leave `album_id` out to store the media in the account's default vault
        album (what the Fansly Dashboard shows when you open the Vault), or pass
        one to store it in a specific album — Fansly's built-in albums as well
        as your own. **Refer to our List Vault Albums endpoint** to look up
        album IDs.


        The response also carries the reusable `fansly_media_` handle, so vault
        media can be attached to chat messages and posts without re-uploading
        it.
      parameters: []
      responses:
        "200":
          description: Synchronous upload (default)
          content:
            application/json:
              schema:
                type: object
                example:
                  prefixed_id: fansly_media_01JR1234ABCD5678EFGH
                  file_name: photo.jpg
                  media_id: "800000000000000010"
                  media:
                    id: "800000000000000010"
                    type: 1
                    status: 1
                    accountId: "800000000000000001"
                    mimetype: image/jpeg
                    filename: photo.jpg
                    width: 1080
                    height: 1080
                  credits_used: 1
                  vault_album_id: "800000000000000200"
                properties:
                  prefixed_id:
                    type: string
                    example: fansly_media_01JR1234ABCD5678EFGH
                  file_name:
                    type: string
                    example: photo.jpg
                  media_id:
                    type: string
                    example: "800000000000000010"
                  media:
                    type: object
                    properties:
                      id:
                        type: string
                        example: "800000000000000010"
                      type:
                        type: integer
                        example: 1
                      status:
                        type: integer
                        example: 1
                      accountId:
                        type: string
                        example: "800000000000000001"
                      mimetype:
                        type: string
                        example: image/jpeg
                      filename:
                        type: string
                        example: photo.jpg
                      width:
                        type: integer
                        example: 1080
                      height:
                        type: integer
                        example: 1080
                  credits_used:
                    type: integer
                    example: 1
                  vault_album_id:
                    type: string
                    example: "800000000000000200"
        "202":
          description: Async upload (async=true)
          content:
            application/json:
              schema:
                type: object
                example:
                  status: pending
                  prefixed_id: fansly_media_01JR1234ABCD5678EFGH
                  polling_url: https://app.onlyfansapi.com/api/fansly/fansly_acct_XXXXXXXXXXXXXXX/media/uploads/fansly_media_01JR1234ABCD5678EFGH/status
                properties:
                  status:
                    type: string
                    example: pending
                  prefixed_id:
                    type: string
                    example: fansly_media_01JR1234ABCD5678EFGH
                  polling_url:
                    type: string
                    example: https://app.onlyfansapi.com/api/fansly/fansly_acct_XXXXXXXXXXXXXXX/media/uploads/fansly_media_01JR1234ABCD5678EFGH/status
      tags:
        - Vault
      requestBody:
        required: false
        content:
          multipart/form-data:
            schema:
              type: object
              properties:
                file:
                  type: string
                  format: binary
                  description: "The file to upload. Required if `file_url` is not provided.
                    Maximum file size: 100 MB."
                file_url:
                  type: string
                  description: A URL to download the file from. Required if `file` is not
                    provided.
                  example: https://example.com/media/photo.jpg
                async:
                  type: boolean
                  description: Set to `true` to process the upload in the background. Returns a
                    `polling_url` to check status. Recommended for large
                    files/videos.
                  example: true
                album_id:
                  type: string
                  description: The vault album to store the media in. Defaults to the account's
                    default vault album.
                  example: "943707572253241344"
components:
  securitySchemes:
    default:
      type: http
      scheme: bearer
      description: Get your API Key from OnlyFansAPI Console -
        https://app.onlyfansapi.com/api-keys
````