How can we differentiate any function call is coming from API or from web browser UI

Hi All

How can we differentiate that any function call is coming from API or from web browser UI? Like create() function of commande. How will I make a differentiation that the create function is calling from any API call or from web browser UI.

Thanks in advance.

Saikat