Is it possible to render only keyframes from Dope-sheet?
Render all frames of the selected object(s) that have a keyframe:

import os
import bpy

original_frame = bpy.context.scene.frame_current
output_path = bpy.context.scene.render.filepath
start = bpy.context.scene.frame_start
end = bpy.context.scene.frame_end
frames = []

for obj in bpy.context.selected_objects:
    for fcurve in obj.animation_data.action.fcurves:
        for keyframe_point in fcurve.keyframe_points:
            x, y = keyframe_point.co
            if x &gt;= start and x &lt;= end and x not in frames:
                frames.append(x)

for frame in frames:
    bpy.context.scene.frame_current = frame
    bpy.context.scene.render.filepath = os.path.join(output_path, "%05d" % frame)
    bpy.ops.render.render(write_still=True)

bpy.context.scene.frame_current = original_frame
bpy.context.scene.render.filepath = output_path