KnightOfNi Unfortunately, this is basically impossible. The closest you could get would be to spawn a projectile which looks like a pre-programmed ship, but your options there are highly limited
As far as an API goes, there isn't any way to edit the actual source code with mods as of right now, but you can check C:\Program Files\Cosmoteer\Standard Mods\example_mod\mod.txt for Walt's explanation on how the current modding system works. If you have any additional questions, feel free to ask here, or hop onto the Cosmoteer discord, where most of the community resides. Welcome to the modding community!