Media Upload

Convert Upload

Registers an uploaded file with OnlyFans and returns it ready to attach to a message. The account's upload settings and watermark are applied for you. Step 5 of Uploading Media. Requires permission api_media_upload.

https://public-api.fansmetric.com
POST/v1/{account_id}/upload/convert
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
  • key*string

    The key from the Create Signed Upload answer.

  • uploadToken*string

    uploadToken from the Create Signed Upload answer.

  • putUrl*string

    The address you sent the file to. For a file in pieces, the first piece's putUrl.

  • ETag*string

    One piece: the ETag header from sending the file, which is also the file's MD5. Pieces: the ETag from Finish Multipart Upload. Double quotes are optional.

  • contentType*string

    The file type you gave Create Signed Upload, such as image/jpeg. It decides which of the account's watermark settings applies.

  • namestring

    The file name OnlyFans keeps. Defaults to the name at the end of key.

Response Fields

  • dataobject

    The file, ready to attach: put it in mediaFiles of Send Message or Send Mass Message as it is.

  • data.processIdstring

    OnlyFans's reference for the file while it is processed. Pass it back unchanged.

  • data.hoststring

    Pass it back unchanged.

  • data.namestring

    The file name.

  • data.extrastring

    Pass it back unchanged.

  • _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/convert" \
  --header "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  --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=...",
  "ETag":        "\"d41d8cd98f00b204e9800998ecf8427e\"",
  "contentType": "image/jpeg"
}'

Response

200
{
"data":{
"processId":"abc123..."
"host":"def456..."
"name":"photo.jpg"
"extra":"ghi789..."
}
"_meta":{
"_credits":{
"used":1
}
"_rate_limits":{
"limit_minute":1000
"remaining_minute":999
"limit_day":50000
"remaining_day":49999
}
}
}

Behavior

Upstream OnlyFans endpoint: POST https://convert.onlyfans.com/file/upload.

Registering doesn't put the file in the vault — it gets there once it's sent in a message. See Uploading Media.

Where this fits: Uploading Media.

  • 400 when a field is missing or has the wrong type — the message says which
  • 400 with Invalid input. when key or uploadToken doesn't match the upload — use the key from the Create Signed Upload answer