Jump to content
Setting up an AI agent? ReverseEngineering.wiki skill (works from the command line, no configuration): https://reverseengineering.wiki/skill/rewiki/SKILL.md · setup for every client, including MCP: https://reverseengineering.wiki/llms.txt · REWiki:Connect

Library:Steamworks API

From ReverseEngineering.wiki
Library
Developer Valve
Vendor Valve
Platforms Windows, Linux, macOS
Website https://partner.steamgames.com/doc/sdk
On this wiki Facts · Code · Notes · Topics

Valve's Steamworks SDK runtime as seen by an analyst: steam_api.dll / steam_api64.dll / libsteam_api.so / libsteam_api.dylib is a thin redistributable stub; games call SteamAPI_Init (or SteamAPI_InitFlat), which checks a list of versioned interface strings such as SteamUser023 that date the SDK the game was built with.

Overview

The game links to steam_api.dll (x86), steam_api64.dll (x64), libsteam_api.so or libsteam_api.dylib. The library connects to the running Steam client (steamclient) over local IPC and hands out C++ interface objects (ISteamUser, ISteamFriends, ISteamUserStats, ISteamUGC, ...) whose virtual tables live in the DLL/the client. A flat C API (SteamAPI_ISteamUser_GetSteamID etc., header steam_api_flat.h) exists for non-C++ callers. The header copies in rlabrecque/Steamworks.NET (MIT bindings; the Valve headers inside remain under Valve's SDK terms) document everything below.

Identifying it and dating the SDK

  • Exports: SteamAPI_Init, SteamAPI_InitFlat, SteamAPI_InitSafe, SteamAPI_Shutdown, SteamAPI_RunCallbacks, SteamAPI_RestartAppIfNecessary, SteamAPI_IsSteamRunning, SteamAPI_GetHSteamUser, SteamAPI_RegisterCallback/SteamAPI_RegisterCallResult, SteamAPI_ManualDispatch_*, SteamInternal_ContextInit, SteamInternal_CreateInterface, SteamInternal_FindOrCreateUserInterface, SteamGameServer_Init.
  • Newer SDKs (the inline SteamAPI_InitEx in steam_api.h) call SteamInternal_SteamAPI_Init with one block of NUL-separated interface version strings; searching the game's data for SteamUtils0 or SteamUser0 shows that block. The version numbers of that block tell which SDK it was compiled with (see the version fact).
  • steam_appid.txt next to the executable provides the app id when it is not launched by Steam; SteamAPI_RestartAppIfNecessary(appid) relaunches through Steam if needed.
  • Callback messages carry ids built from the per-interface bases listed in the callback fact (k_iSteamUserCallbacks = 100 ...).

Look-alike libraries

Some files named steam_api(64).dll are replacements implementing the same exports (emulators for license-free use). This wiki does not document using them; recognising one only means the exports are present but the file is not Valve's (check the signature and size against the original from a legitimate SDK).

Code & repositories

  • https://github.com/rlabrecque/Steamworks.NET (MIT) with CodeGen/steam/*.h and steam_api.json. README says it builds against SDK 1.65.
  • https://github.com/rlabrecque/Steamworks.NET @ ba71581f1ed7349e8d0f17ddc6f135dd3bc8a6a3 · license: MIT (read from LICENSE.txt; GitHub's API was busy)
    Steamworks.NET: C# bindings and CodeGen copies of the Steamworks headers with steam_api.json
    Tested on: source read, not run: source read only · checked 2026-10-18

Related

Library:GameNetworkingSockets, Library:Discord RPC, Library:Epic Online Services SDK.