Prerequisites
You have a connected OnlyFans account with a valid
connectionIdUpload Flow Overview
Uploading media is a multi-step process:Step 1: Initialize Upload
Tell OFAuth about the file you want to upload:
Example response:
The response also includes
x-ofauth-upload-total-parts and x-ofauth-upload-part-size headers for backward compatibility. Prefer the response body for new integrations.Step 2: Upload the File
Single-Part Upload (Small Files)
For files that fit in one part (upload.uploadType is "single"), upload the whole file to the first uploadUrl:
Multi-Part Upload (Large Files)
For larger files, upload eachparts[] entry. Slice the file using the provided byteRange, then send that chunk to the entry’s uploadUrl:
Step 3: Complete Upload (Multi-Part Only)
For multi-part uploads, callcompleteUrl after all chunks are uploaded:
mediaUploadId in a post or message:
Single-part uploads auto-complete. When
uploadType is "single", the PUT response returns the media directly. Do not call /complete.Minimal JavaScript Multipart Example
Supported Formats
Using Uploaded Media
Once uploaded, use the media in posts or messages.Use Upload Reference Directly
Pass themediaUploadId string directly to mediaItems - the system resolves it automatically:
Upload references are automatically resolved to vault media IDs by the API. This is the simplest approach.
Use Vault Media ID
If your upload workflow returnsmedia, you can use the numeric vault media ID instead:
What mediaItems Accepts
See the mediaItems reference.
Check for Existing Uploaded Media
Use/uploads/check to see if media with a known upload ETag and size already exists in the vault:
Response body:
Error Handling
Tips & Best Practices
Upload to vault first for reuse: Vault uploads give you a media ID or upload reference that you can attach to posts and messages.
Next Steps
Create a Post
Use uploaded media in posts
Send a Message
Send media in direct messages