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.
Access the XGen devkit folder by browsing to \runTime\plug-ins\xgen\devkit. Here you can find code samples for the XGen instancer and XGen interactive grooming splines.
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 information about expression use in XGen, see XGen Expressions.