Create custom method and call it via api

How can I create a custom method with parameters and call it via API.

I need a sample guide to implement this.

thanks.

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

The above link doesn’t say anything about custom rest api implemention!