Create Sales Invoices based on Sales Order ID using API

Hello folk, i didnt find a required parameter in Sales Invoices API to create sales invoice from Sales Order ID, while in the business documentation at erpnext knowledge it shows a clear relation between sales order and sales invoice. can you please advice what API to use to create sales invoice from sales order id. thank you

The sales invoice uses a custom button to show orders from the customer you can bill:

It uses this method:

Since the method is whitelisted, you can use it via API.

thank you Kenneth for your help.