I’d like to be able to create/modify the ‘Name’ attribute of an EC2 instance, ie, the field shown by ‘Name’ in the web UI.

I am quite comfortable spawning instances via the Amazon API, however I cannot find any references to instance naming in the API reference. How can I create an instance with the Name attribute set, or modify the Name of an existing instance?
The Name attribute is just a regular tag, that happens to be available/used by default for many resources, including Amazon EC2 instances.
Accordingly, you can change it e.g. via the Amazon EC2 API Tools (ec2-create-tags, ec2-describe-tags, ec2-delete-tags), which facilitate the respective APIs in turn, see section API within Using Tags for more details:
These actions are further detailed in the Amazon Elastic Compute Cloud API Reference as usual: