How to add a curve name from bevel_object to the name of the output image render?
If I got what you mean, you need to edit this property, 

https://docs.blender.org/api/blender_python_api_current/bpy.types.NodeOutputFileSlotFile.html

this string will be the prefix for output to image from that node, as you see below:



Of course you need to know the name of the object, as you say, but I guess this is quite easy...