Hiya,
ZAP can be run as a desktop tool with a UI, as a headless daemon and as an inline command line tool.
The inline command options are pretty limited, so I'd recommend using the daemon.
You dont need to download or install anything new, just run ZAP using the zap.cmd script and specify -daemon as a parameter.
If you point your browser at the host/port ZAP is listening on then you'll see a link to a web UI for the API. Its basic looking but fully functional and may help you find your way around the API.
The ZAP python API is on PyPI and we have some documentation here:
https://github.com/zaproxy/zaproxy/wiki/ApiPythonWe use the python API for testing ZAP against vulnerable web apps like wavsep - have a look at this script:
https://github.com/zapbot/zap-mgmt-scripts/blob/master/wavsep/wavsep-1.5-spider-scan.pyHopefully that will help get you started, but we know the documentation is somewhat lacking so please ask questions on this group when you have them ;)
Cheers,
Simon