Your cart is empty.
Integrate your FiveM server or external applications with Code Art's secure file hosting system. Authenticate, list, and download files with simple REST calls.
Every request must include your API Key in the request header:
Authorization: Bearer YOUR_API_KEY
http://code-art.codes/api/v1
All API endpoints are relative to this base URL.
Check that your API key is valid and the server is reachable.
{
"status": "ok",
"message": "Connection successful",
"user": "your_username",
"bot": "My Bot Name"
}
Returns a list of all files uploaded to your bot.
{
"status": "ok",
"files": [
{
"name": "config.lua",
"size": "2.45 KB",
"sizeBytes": 2510,
"type": "text/x-lua",
"uploaded_at": "2026-04-01T12:00:00.000Z"
}
]
}
Downloads the file content directly. Replace :filename with the actual filename.
Returns the raw file content with appropriate Content-Type and Content-Disposition headers.
{
"status": "error",
"message": "File not found"
}
| Code | Meaning | Description |
|---|---|---|
| 401 | Unauthorized | Missing or invalid API key |
| 403 | Forbidden | Account suspended |
| 404 | Not Found | File does not exist |
| 429 | Rate Limited | Too many requests (60/min) |
The API enforces rate limiting to ensure fair usage and system stability.
const API_KEY = 'ca_your_api_key_here';
const BASE_URL = 'https://yourdomain.com/api/v1';
// Test connection
async function testConnection() {
const res = await fetch(`${BASE_URL}/ping`, {
headers: { 'Authorization': `Bearer ${API_KEY}` }
});
const data = await res.json();
console.log(data);
}
// List all files
async function listFiles() {
const res = await fetch(`${BASE_URL}/files`, {
headers: { 'Authorization': `Bearer ${API_KEY}` }
});
const data = await res.json();
console.log(data.files);
}
// Download a specific file
async function downloadFile(filename) {
const res = await fetch(`${BASE_URL}/files/${filename}`, {
headers: { 'Authorization': `Bearer ${API_KEY}` }
});
const blob = await res.blob();
// Save or process the file...
}
local API_KEY = "ca_your_api_key_here"
local BASE_URL = "https://yourdomain.com/api/v1"
-- Test connection
PerformHttpRequest(BASE_URL .. "/ping", function(code, text, headers)
if code == 200 then
print("✅ Connected: " .. text)
else
print("❌ Failed: " .. tostring(code))
end
end, "GET", "", {
["Authorization"] = "Bearer " .. API_KEY
})
-- List files
PerformHttpRequest(BASE_URL .. "/files", function(code, text, headers)
if code == 200 then
local data = json.decode(text)
for _, file in ipairs(data.files) do
print(file.name .. " (" .. file.size .. ")")
end
end
end, "GET", "", {
["Authorization"] = "Bearer " .. API_KEY
})
-- Download a file
PerformHttpRequest(BASE_URL .. "/files/config.lua", function(code, text, headers)
if code == 200 then
-- Save or use the file content
SaveResourceFile(GetCurrentResourceName(), "downloaded.lua", text, -1)
print("✅ File downloaded!")
end
end, "GET", "", {
["Authorization"] = "Bearer " .. API_KEY
})
# Test ping
curl -H "Authorization: Bearer ca_your_api_key" \
https://yourdomain.com/api/v1/ping
# List files
curl -H "Authorization: Bearer ca_your_api_key" \
https://yourdomain.com/api/v1/files
# Download a file
curl -H "Authorization: Bearer ca_your_api_key" \
-o downloaded_file.lua \
https://yourdomain.com/api/v1/files/config.lua