I am having a hard time pinning down which function creates a prepared statement.
...
e.g.
In your favorite language:
This doesn't seem like the correct list for this question. Ponder the following and consider sending any follow-up fresh to the -general list.
The behavior would be specific to "your favorite language" so you should ask there. Client-side drivers can do lots of things besides interacting directly with the server.
The docs for the server cover what facilities it provides for handling prepared statements, both in the protocol [1] and in SQL [2].
You might find that saying why you are investigating this elicits more helpful responses.