Uploading media
Learn how to upload photos/videos, and include them in your posts or messages.
OnlyFans API makes it really easy to include photos and videos in your posts and messages. You can upload media files directly to our API, and then reference them in our relevant endpoints.
Prepare the relevant photo or video
- If you want to use a new photo or video, you may upload it to our API.
- Alternatively, if you want to use a photo or video from your Vault, you may reference its ID directly in the relevant endpoints.
Upload your photo or video to our API
The full media upload endpoint documentation can be found here.
Submit a POST request to our https://app.onlyfansapi.com/api/{account}/media/upload
endpoint, with form-data
as the body type.
It must have a file
field, which is the media file you want to upload. This can either be a photo or a video, and it can be in any format that OnlyFans supports (e.g., JPEG, PNG, MP4).
If the upload was successful, the response will be something as follows:
You may use the prefixed_id
(e.g., mfu_123
) in our relevant endpoints to include this media file.
Important!
The prefixed_id
from the above request can only be used once. After you use it in a post or message, it will no longer be valid for future use. If you want to reuse the same media file, you must upload it again to get a new prefixed_id
.
Including your media in a new post
The full send post endpoint documentation can be found here.
Once you have retrieved the correct media IDs (either from the upload response, or from your Vault), you can include them in your post:
Including your media in a chat message
The full send chat message endpoint documentation can be found here.
Once you have retrieved the correct media IDs (either from the upload response, or from your Vault), you can include them in your post:
Media file array options
You can include two different types of IDs in the mediaFiles
array:
-
An OnlyFans API prefixed_id starting with
mfu_
- This needs to be the
prefixed_id
of the media file we just uploaded.
Important!
The
mfu_
ID from a media file upload can only be used once. After you use it in a post or message, it will no longer be valid for future use. If you want to use it again, you must upload it again to get a newprefixed_id
, or use the OnlyFans Vault Media ID. - This needs to be the
-
An OnlyFans Vault Media ID like
1234567890
- This is the OnlyFans ID of a media file that already exists in the Vault.