Skip to content
GhostTypes edited this page Aug 13, 2026 · 6 revisions

FlashForge API Documentation

Welcome to the unofficial FlashForge API documentation wiki. This repository is a technical resource. It documents how to communicate with FlashForge 3D printers over the network.

The documentation covers the internal networking protocols, HTTP REST APIs, TCP fallback mechanisms, M-Code extensions, and hardware states that modern FlashForge printers use. It focuses on the Adventurer 5M series and the AD5X models.

What's Documented Here

Core Networking & Protocols

  • Discovery & Identification: How to detect FlashForge printers on the local network via UDP broadcasts.
  • Authentication: The JSON-based authentication mechanism required to interact with the HTTP API.
  • HTTP REST API: The primary mechanism to monitor printer status, control operations, and manage files (Port 8898).
  • TCP Protocol: The lower-level socket protocol (Port 8899) to control motion directly, home the axes, and support legacy models.

Printer Models & Capabilities

  • Adventurer 5M Series: Architectural overview and HTTP/TCP API implementation details specific to the AD5M hardware.
  • Adventurer 5M Pro Features: Additional commands and state fields unique to the Pro model (e.g., camera control, air filtration, TVOC sensors).
  • AD5X Integration: Details regarding the Adventurer 5X model and its extended API commands.
  • AD5X IFS Material Station: Complete integration guide for the Intelligent Filament Station, outlining multi-material command structures and state monitoring.
  • Creator 5 Series: The 4-head CoreXY tool-changer (Creator 5 / 5 Pro). HTTP-only (no TCP), per-tool temperatures, material station, and a distinct command surface.
  • Adventurer 3 Series: Legacy TCP-only protocol and communication references.
  • Adventurer 4 Series: TCP-only protocol reference for the A4 Pro and A4 Lite.

Command References

  • M-Code Reference: FlashForge-specific M-Code extensions used within TCP payloads and G-code files.
  • G-Code Reference: Information on standard and extended G-code commands supported by the firmware.

State & Error Management

  • State Machines: Detailed breakdowns of the internal state machine (Printer Status, Print Status, Error Status) indicating how the printer transitions between operations.
  • Capability Matrix: Feature and command support matrix across all printer families.
  • Error Codes: Lists of HTTP API errors, TCP communication errors, and IFS failure states, with standard software recovery strategies.

Advanced / Hardware

Getting Started

If you develop integrations or custom control software, start with the Discovery Protocol to locate devices. Then use Authentication to open a secure session with the HTTP REST API.

For direct control of physical hardware (such as custom homing or manual extrusion), ensure that no print job is active. Then refer to the TCP Protocol.


Note: This documentation focuses strictly on API, protocol, and command-level interactions. End-user troubleshooting or physical maintenance is outside the scope of this wiki.

Clone this wiki locally