The first is to just use the fact the GPT-4 will have seen a lot of blender code so just knows how to do it.
The second way is to tell GPT-4 in the prompt what the API surface looks like and have it script against that.
https://github.com/gd3kr/BlenderGPT/blob/main/__init__.py