Integrations
Use the CDN with screenshot-basic, ox_inventory, the NUI and the loading screen, and upload files from any script through the HTTP API.
Use the CDN with screenshot-basic, ox_inventory, the NUI and the loading screen, and upload files from any script through the HTTP API.
The CDN is the warehouse for everything the city shows: inventory icons, the loading screen, scripts’ NUI and the screenshots the game takes. This page shows the integrations the FiveDash panel already has ready and, for everything else, how to upload files through the HTTP API. It’s for whoever sets up the server’s scripts.
The panel generates ready screenshot-basic code when you create a key.
In CDN → Files, create (or use) the screenshots folder.
In CDN → Settings → Upload keys, click New key, pick the screenshots folder in Uploads to and click Create key.
In the Key created window, open the screenshot-basic (Lua) tab and click Copy code. The code already has the upload address and the key.
Paste the code on the client side of the script that takes the screenshot and restart the script.
The code the panel generates looks like this:
exports['screenshot-basic']:requestScreenshotUpload('https://cdn.fivex.sh/api/v1/upload', 'file', {
headers = { ['Authorization'] = 'Bearer fdm_xxxxxxxx' },
encoding = 'webp'
}, function(data)
local res = json.decode(data)
print(res.url) -- cdn.fivex.sh/example-city/screenshots/print-….webp
end)
res.url is the screenshot’s public link, ready to send in a log or a webhook.
Upload the icons to a folder, like itens. Each item uses a file with its name, like item-name.png.
In CDN → Files, select the folder to see its details. Under Inventory images, copy the ready line.
Paste the line into server.cfg and restart the server.
The line looks like this:
setr inventory:imagepath "https://cdn.fivex.sh/example-city/itens"
To use a file in HTML, CSS, Lua or on Discord, open the file’s menu and use Copy as:
| Option | Where to use it | What it copies |
|---|---|---|
| Lua | config.lua and scripts | "https://cdn.fivex.sh/example-city/itens/agua.png" |
| HTML (image) | The NUI and the loading screen | <img src="https://cdn.fivex.sh/…" alt="agua"> |
| HTML (video) | Loading screen video background | <video src="https://cdn.fivex.sh/…" autoplay muted loop playsinline></video> |
| HTML (audio) | Loading screen music | <audio src="https://cdn.fivex.sh/…" preload="auto"></audio> |
| CSS | NUI or loading screen background | background-image: url("https://cdn.fivex.sh/…"); |
| Markdown | Discord messages |  |
Phone scripts, cameras, report attachments and any other tool that can make an HTTP request can upload files with an upload key.
curl -X POST https://cdn.fivex.sh/api/v1/upload \
-H "Authorization: Bearer fdm_xxxxxxxx" \
-F "file=@print.png"
| Part | Value |
|---|---|
| Method and address | POST https://cdn.fivex.sh/api/v1/upload |
Authorization | Bearer followed by the key (fdm_…) |
| Body | multipart/form-data with one file in the file field (or files[]) |
| Size | Up to 20 MiB per file |
| Formats | PNG, JPEG, WebP, GIF, SVG, MP4, WebM, MOV, MP3, OGG, WAV, M4A |
| Folder | Always the key’s folder. You can’t pick another one in the form. |
Idempotency-Key (optional) | 8 to 128 characters (letters, numbers, _, ., -). Repeating the same upload with the same key for up to 24 hours doesn’t duplicate the file. |
The file name comes from the uploaded file. If one with the same name is already in the folder, the new one gets a number (print-1.png). The CDN’s Images settings (optimization, max width, metadata) also apply to API uploads.
The response has the public link in url:
{
"ok": true,
"id": "a1b2c3d4-…",
"url": "https://cdn.fivex.sh/example-city/screenshots/print.png",
"file": {
"id": "a1b2c3d4-…",
"name": "print.png",
"kind": "image",
"mime": "image/webp",
"size": 482133,
"width": 1920,
"height": 1080,
"uploadedBy": "Chave: Game camera",
"createdAt": "2026-11-09T14:28:00.000Z"
}
}
Only with a key that has Can also delete, and only files that same key uploaded:
curl -X DELETE https://cdn.fivex.sh/api/v1/files/a1b2c3d4-… \
-H "Authorization: Bearer fdm_xxxxxxxx"
The response is {"ok":true}.
Errors come as {"ok": false, "code": "…", "message": "…"}, with the message in Portuguese.
| Status | When |
|---|---|
400 | Invalid form, no file in the file field, more than one file, or an invalid Idempotency-Key. |
401 | Missing, invalid or revoked key. |
403 | The key can’t delete files. |
404 | The key’s folder isn’t available, or the file to delete doesn’t exist (or isn’t this key’s). |
409 | Same Idempotency-Key with a different file. |
413 | File larger than allowed. |
429 | A plan allowance was reached, or too many attempts. |
503 | The CDN is unavailable. Try again. |
Full technical details in CDN API.
Can I use ShareX or another screenshot app?
FiveDash doesn’t ship a ready config for them. Any app that can POST multipart/form-data with the file field and the Authorization: Bearer fdm_… header works with the API above. The response has the link in url.
Does the uploaded screenshot show in the panel? Yes. It lands in the key’s folder, with Uploaded by “Chave: …”, and counts toward storage and allowances.
Can I send the screenshot’s link in a FiveDash log?
Yes. With the export, use the image option with the link. See FiveM resource.