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.

https://frappeframework.com/docs/v14/user/en/api/rest#remote-method-calls

thank you Kenneth for your help.