Creating an account
Register from the website or directly against the API. Usernames are 3–32 characters using letters, numbers, and underscores. Passwords must be at least 8 characters.
Create your account on the register page , or via the API:
Copy curl -X POST https://scriptapi.cflat.workers.dev/auth/register \
-H "Content-Type: application/json" \
-d '{"username":"player_one","password":"super-secret-pw"}'
A successful response returns 201 with a session token and your user object:
Copy {
"token": "qXf3...base64url...9Az",
"user": { "id": 1, "username": "player_one", "created_at": "2026-06-07 18:42:11" }
}
Store the token securely. The web app keeps it in localStorage under the key cflat:token for reliable cross-domain auth.
Authenticating with the API
Log in to receive a session token, then send it as a Bearer token on authenticated requests. Tokens last 30 days.
Log in:
Copy curl -X POST https://scriptapi.cflat.workers.dev/auth/login \
-H "Content-Type: application/json" \
-d '{"username":"player_one","password":"super-secret-pw"}'
Verify who you are with the token:
Copy curl https://scriptapi.cflat.workers.dev/auth/me \
-H "Authorization: Bearer YOUR_TOKEN_HERE"
Returns your user object, or 401 if the token is missing or expired.
Sign out (invalidates the current session):
Copy curl -X POST https://scriptapi.cflat.workers.dev/auth/logout \
-H "Authorization: Bearer YOUR_TOKEN_HERE"
Running your first script
Browse the library , pick a tool, and run it with your executor of choice. A typical loader fetches the latest file from the CDN.
Copy -- Example loader (Lua)
local URL = "https://scriptapi.cflat.workers.dev/files/scripts/aurora-hub.lua"
loadstring(game:HttpGet(URL))()
Once loaded, press Right Shift in-game to open the built-in panel, toggle features, and save a preset. Settings persist between sessions.
Using the file CDN
Files live behind /files/ . A path that is empty or ends in / returns a directory listing; any other path streams the file.
List a directory:
Copy curl https://scriptapi.cflat.workers.dev/files/scripts/
Listings look like this:
Copy {
"prefix": "scripts/",
"directories": ["beta/"],
"files": [
{ "key": "scripts/aurora-hub.lua", "name": "aurora-hub.lua",
"size": 48213, "uploaded": "2026-06-05T12:00:00Z", "etag": "a1b2c3" }
]
}
Download a file:
Copy curl -O https://scriptapi.cflat.workers.dev/files/scripts/aurora-hub.lua
Upload to your space (requires auth):
Copy curl -X PUT https://scriptapi.cflat.workers.dev/files/my/config.json \
-H "Authorization: Bearer YOUR_TOKEN_HERE" \
-H "Content-Type: application/json" \
--data-binary @config.json
Delete a file (requires auth):
Copy curl -X DELETE https://scriptapi.cflat.workers.dev/files/my/config.json \
-H "Authorization: Bearer YOUR_TOKEN_HERE"
You can also manage your files visually from the dashboard .
API reference
Base URL: https://scriptapi.cflat.workers.dev
GET /health — service status check.
POST /auth/register — create account, returns token + user.
POST /auth/login — log in, returns token + user.
POST /auth/logout — end the current session.
GET /auth/me — current user (requires Bearer token).
GET /files/<path> — list a directory or stream a file (Range supported).
PUT /files/<path> — upload a file (requires auth).
DELETE /files/<path> — delete a file (requires auth).
Need help? Reach out through our team or open a request in the community. We respond fast.