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.com
POST/v1/{account_id}/upload/signed/create
Bearer

Authorization

default
AuthorizationBearer <token>

Send your FansMetric API key as a Bearer token in the Authorization header.

In: header

Path Parameters

  • account_id*integer

    OnlyFans numeric account ID.

Request Body

application/json
  • fileName*string

    The file's name, such as photo.jpg.

  • size*integer

    The file's size in bytes. Files over 5 MB (5,242,880 bytes) go up in 5 MB pieces.

  • contentType*string

    The file's type, such as image/jpeg or video/mp4.

Response Fields

  • data.keystring

    The name OnlyFans stored the file under. Every later step uses it.

  • data.uploadTokenstring

    Proof of this upload. Convert Upload needs it.

  • data.putUrlstring

    One-piece uploads only. Send the whole file here.

  • data.uploadIdstring

    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.getUrlstring

    Where OnlyFans will serve the file from. No later step needs it.

  • dataobject | array

    Endpoint-specific payload. See the fields below for this route.

  • _meta._credits.usedinteger

    Credits consumed by this request (currently always 1).

  • _meta._rate_limits.limit_minuteinteger

    Maximum requests per minute for the organization.

  • _meta._rate_limits.remaining_minuteinteger

    Remaining requests in the current minute window.

  • _meta._rate_limits.limit_dayinteger

    Maximum requests per day for the organization.

  • _meta._rate_limits.remaining_dayinteger

    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

200
{
"data":{
"key":"upload/111222333/8a3d4c2e-7f1b-4c5d-9e8f-1a2b3c4d5e6f/529838163914/photo.jpg"
"uploadToken":"def456..."
"putUrl":"https://of2transcoder.s3-accelerate.amazonaws.com/upload/111222333/8a3d4c2e-.../529838163914/photo.jpg?X-Amz-Signature=..."
"getUrl":"https://upload.onlyfans.com/upload/111222333/8a3d4c2e-.../529838163914/photo.jpg?Policy=..."
}
"_meta":{
"_credits":{
"used":1
}
"_rate_limits":{
"limit_minute":1000
"remaining_minute":999
"limit_day":50000
"remaining_day":49999
}
}
}

Behavior

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.

  • 400 when fileName, size or contentType is missing, or a field has the wrong type — the message says which