what is the default extension for generated images?

for a script i’m writing, i need the file extension, like png, of an image created in blender.
i am adding the immage in the script, and need to assign it, and this can only happen with an extension, so the info says.