Skip to main content
Install the SDK as a FiveM resource and configure the service key in server.cfg.

Prerequisites

Before you begin, confirm:
  • FiveMesh CDN is set up for the workspace.
  • You have a service key with the permissions your script needs.
  • You can edit server.cfg.
  • screenshot-basic is installed if you plan to use screenshot exports.

Install the resource

1

Download the SDK

Download the latest release from the FiveMesh/sdk GitHub repository.Releases include a built and zipped FiveM resource.
2

Place it in your resources folder

Add the folder to your FiveM server resources directory.The examples in these docs assume the folder is named fivemesh-sdk. If you use another folder name, use that name in ensure and exports[...].
3

Configure server.cfg

Add the resource and service key to server.cfg.
ensure screenshot-basic # only required for screenshot helpers
ensure fivemesh-sdk

set FIVEMESH_API_KEY "fm_live_..."
4

Restart the resource

Restart the server or run:
refresh
ensure fivemesh-sdk
When the SDK starts, the server console prints [FiveMesh SDK] Ready.

Configuration

ConVarDefaultDescription
FIVEMESH_API_KEYnoneService key created in the FiveMesh dashboard.
FIVEMESH_API_KEY_<PROFILE_NAME>noneOptional case-sensitive API key profile used by SDK calls with keyProfile.
FIVEMESH_API_URLhttps://api.fivemesh.io/v1FiveMesh API base URL.
FIVEMESH_SDK_DEBUGfalsePrints the resolved API base URL when the resource starts.
FIVEMESH_CDN_API_KEY and FIVEMESH_SERVICE_API_KEY are accepted as fallback key names, but new installs should use FIVEMESH_API_KEY.

API key profiles

Use FIVEMESH_API_KEY for the default SDK key. If you want separate keys for specific resources, add profile keys with the exact profile name in the ConVar suffix.
set FIVEMESH_API_KEY "fm_live_..."
set FIVEMESH_API_KEY_PHONE "fm_live_..."
set FIVEMESH_API_KEY_MUGSHOTS "fm_live_..."
Profile names are case-sensitive. keyProfile = "MUGSHOTS" resolves to FIVEMESH_API_KEY_MUGSHOTS; keyProfile = "mugshots" resolves to FIVEMESH_API_KEY_mugshots.

Next steps