The GM_format was used in GameMaker version 5.3a to 8.1 and was discontinued (although still supported for import and export) in GameMaker: Studio. This article outlines the API developed by Zach Reedy.
The GMK API is written in C++ and is cross platform across all devices. All API is kept in the Gmk namespace.
This is the main API class.
Convert between versions
// Allocate new GMK object & load GM81 file Gmk* gmk = new Gmk(); gmk->Load("in.gm81");
// Change version to Version 5.3a, then invoke save gmk->version = Ver53a; gmk->Save("out.gmd");