Media Upload
Create Signed Upload
Gets the addresses to upload one file to. Step 2 of Uploading Media, which walks through every step from checking the vault to attaching the file to a message. Requires permission api_media_upload.
https://public-api.fansmetric.comAuthorization
defaultAuthorizationBearer <token>Send your FansMetric API key as a Bearer token in the Authorization header.
In: header
Path Parameters
account_id*integerOnlyFans numeric account ID.
Request Body
application/jsonfileName*stringThe file's name, such as
photo.jpg.size*integerThe file's size in bytes. Files over 5 MB (5,242,880 bytes) go up in 5 MB pieces.
contentType*stringThe file's type, such as
image/jpegorvideo/mp4.
Response Fields
data.keystringThe name OnlyFans stored the file under. Every later step uses it.
data.uploadTokenstringProof of this upload. Convert Upload needs it.
data.putUrlstringOne-piece uploads only. Send the whole file here.
data.uploadIdstringUploads in pieces only. Pass it to Finish Multipart Upload.
data.keys[]arrayUploads in pieces only. One
{ part, putUrl }per piece — send each piece to its ownputUrl.data.getUrlstringWhere OnlyFans will serve the file from. No later step needs it.
dataobject | arrayEndpoint-specific payload. See the fields below for this route.
_meta._credits.usedintegerCredits consumed by this request (currently always
1)._meta._rate_limits.limit_minuteintegerMaximum requests per minute for the organization.
_meta._rate_limits.remaining_minuteintegerRemaining requests in the current minute window.
_meta._rate_limits.limit_dayintegerMaximum requests per day for the organization.
_meta._rate_limits.remaining_dayintegerRemaining requests in the current day window.
| Field | Type | Description |
|---|---|---|
| data.key | string | The name OnlyFans stored the file under. Every later step uses it. |
| data.uploadToken | string | Proof of this upload. Convert Upload needs it. |
| data.putUrl | string | One-piece uploads only. Send the whole file here. |
| data.uploadId | string | Uploads in pieces only. Pass it to Finish Multipart Upload. |
| data.keys[] | array | Uploads in pieces only. One { part, putUrl } per piece — send each piece to its own putUrl. |
| data.getUrl | string | Where OnlyFans will serve the file from. No later step needs it. |
| data | object | array | Endpoint-specific payload. See the fields below for this route. |
| _meta._credits.used | integer | Credits consumed by this request (currently always 1). |
| _meta._rate_limits.limit_minute | integer | Maximum requests per minute for the organization. |
| _meta._rate_limits.remaining_minute | integer | Remaining requests in the current minute window. |
| _meta._rate_limits.limit_day | integer | Maximum requests per day for the organization. |
| _meta._rate_limits.remaining_day | integer | Remaining requests in the current day window. |
curl --request POST "https://public-api.fansmetric.com/v1/100000001/upload/signed/create" \
--header "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
--data '{
"fileName": "photo.jpg",
"size": 3014607,
"contentType": "image/jpeg"
}'Response
200Behavior
Upstream OnlyFans endpoint: POST /api2/v2/upload/signed/create.
Files of 5 MB or less go up in one piece, and the answer has putUrl. Bigger files go up in 5 MB pieces, and the answer has uploadId plus one putUrl per piece in keys[]. Asking for one piece always gets a one-piece answer, even for a video.
What to do with the answer: Uploading Media.
400whenfileName,sizeorcontentTypeis missing, or a field has the wrong type — the message says which