Skip to content

FiveM SDK — installation

  • A Spawnbase account and API tokens (Media and/or Logs) from the dashboard.
  • screenshot-basic — required for takeImage / takeServerImage.
  1. Put the spawnbase folder directly in resources/ — not inside a category folder.
  2. Put screenshot-basic in resources/ the same way.
  3. Add the keys to server.cfg as convars (never inside resource files):
set SPAWNBASE_MEDIA_API_KEY "YOUR_MEDIA_TOKEN"
set SPAWNBASE_LOGS_API_KEY "YOUR_LOGS_TOKEN"

Only the key for the features you use is required. The API URL defaults to https://api.spawnbase.gg/api/v1 — no URL line needed.

  1. Start order in server.cfg — screenshot-basic before spawnbase:
ensure screenshot-basic
ensure spawnbase
  1. Restart the server (or run ensure spawnbase in the console).

From any server-side script (or a test resource), send a test entry:

exports.spawnbase:Info("default", "SDK install check", {})

It appears in the dashboard under Logs → default within a few seconds (logs flush every 5s, at 500 entries, or at 512 KB). Nothing there? Check the server console for [spawnbase] lines — a dropped batch with a 401 means the logs token is wrong or missing.

Keep your scripts untouched: also install the fmsdk shim folder and add one line after spawnbase —

ensure spawnbase
ensure fmsdk

— and your old fmsdk/config.json copies straight over spawnbase/config.json. Full steps: migration guide.