Uploading files
Videos & audio
Use a video key (cnf_vid_) or audio key (cnf_aud_). Small files can use direct multipart; larger media should use chunked uploads (or presigned PUT).
Supported paths
- Direct multipart —
POST /api/v1/uploadwhen the full body can reach the API (stay well under typical ~4.5 MB serverless limits in practice). - Chunked —
/api/v1/upload/chunked/init|part|complete. Best for large clips and the path used by the official FiveM resource for all video/audio. - Presigned —
/api/v1/upload/presign→ client PUT →/api/v1/upload/completewhen the client can write directly to storage.
Maximum size
All paths enforce a 100 MB maximum. See large files & chunked uploads for part size, session TTL, and the full protocol.
Small video (direct)
curl
curl -X POST https://app.back2rp.org/api/v1/upload \
-H "Authorization: Bearer cnf_vid_your_key" \
-F file=@clip.mp4 \
-F folder=ClipsSmall audio (direct)
curl
curl -X POST https://app.back2rp.org/api/v1/upload \
-H "Authorization: Bearer cnf_aud_your_key" \
-F file=@voice.oggLarge video / audio (chunked)
Init a session, upload 4 MB parts, then complete with only uploadId:
init
curl -X POST https://app.back2rp.org/api/v1/upload/chunked/init \
-H "Authorization: Bearer cnf_vid_your_key" \
-H "Content-Type: application/json" \
-d '{
"filename": "clip.mp4",
"mimeType": "video/mp4",
"size": 18432000
}'Then call /api/v1/upload/chunked/part for each part and finish with /api/v1/upload/chunked/complete. Full examples are on the chunked uploads page.
FiveM
The official FiveM resource always uses chunked uploads for video and audio. Images use direct multipart up to 3.5 MB, then chunked above that (a client-side threshold, not a separate API hard limit).
