Doesn't appear to be possible with the current API commands, though it does provide a nice opportunity to write your own file upload implementation in to the ticket creation.
The API will always connect from the IP of the server, not the visitor. A workaround would require the IP to be passed on in any case. Essentially a fix for this from WHMCS would do exactly what you have done with your work-around. Though, if you are working with the API to an extent this is an issue, I would also recommend setting up your own logging functions to keep track of IP vs login, and other things.