Duplicates: T25596
r34074 : http://www.blender.org/download/get-256-beta/
>>> a = bpy.data.actions['nuko008-2.Track5']
>>> f = a.fcurves[0]
>>> k = f.keyframe_points.add(1,0.5)
>>> print(k)
<bpy_struct, Keyframe at 0xc80de88>
r34256M : trunk
>>> a = bpy.data.actions['nuko008-2.Track5']
>>> f = a.fcurves[0]
>>> k = f.keyframe_points.add(1,0.5)
>>> print(k)
None
from UI,enable