This folder contains a set of python examples for interacting with the Private AI API. By default the scripts will interact with the Community APIs, but you can also use these as the basis for connecting to the Professional APIs, or to your own running container.
- Ensure you have python 3.12 or later installed. It is recommended to use pyenv if you have multiple python projects with different versions.
- Run
pip install -U pipto ensure you have the latest version of the package installer for python. - Run
pip install -r requirements.txtto install all the packages needed to run the examples. - Get your Community API key from the Private AI Customer Portal.
- Copy the
.env.examplefile to.envand update it with your Community API key.
You can run any example in the examples folder simply by running python examples\<example file>. For example, to try the link batch example, run python examples\async_call.js.