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.
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., ofapi_media_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
.
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:
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:
You can include two different types of IDs in the mediaFiles
array:
An OnlyFans API ID starting with ofapi_media_
. This needs to be the prefixed_id
of the media file we just uploaded.
Important! The ofapi_media_
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. To use the media again, you must use the OnlyFans Vault Media ID.
An OnlyFans Vault Media ID like 1234567890
. This is the OnlyFans ID of a media file that already exists in the Vault. Use our List Vault Media endpoint to retrieve this ID.