You can access the XGen API from the runTime directory of the Maya installation package. For example, from the Maya installation package browse to:
\runTime\plug-ins\xgen\include\xGen\XgExternalAPI.h.
For the Python wrappers, browse to the following location:
\runTime\plug-ins\xgen\scripts\xgenm\XgExternalAPI.py.
Starting in Maya 2016, the name of the include directory has changed from xgen to XGen.
For example the path of XGen header files has changed from:
C:/Program Files/Autodesk/Maya2015/plug-ins/xgen/include/xgen
to
C:/Program Files/Autodesk/Maya2016/plug-ins/xgen/include/XGen.
For the XGen expression reference, see XGen expression reference.