How do I re-initialize a deleted image?
I had the same problem, yet not with scripting, but with my blend file moving to another computer, and I didn't take saved images with me.

Go to UV/Image editor, press N to bring up the properties panel, and in image tab change source to "Generated". You can change the resolution there as well if you need to.



As for scripting, you probably need to do 

bpy.data.images["your_bake_texture"].source = 'GENERATED' 

I haven't tried it myself, but I suppose it is what you need, that's what the info panel shows when I change source. It works from console at least.

EDIT1: a quick script to reinitialize all images in all materials in the active object, provided you have selected the image texture nodes in all materials (you need to do this to bake your textures anyway):

import bpy

for slot in bpy.context.active_object.material_slots:

    mat = slot.material

    imag = mat.node_tree.nodes.active.image

    imag.source = 'GENERATED'