app.project.item(index).layer(index).propertySpec.addKey(time)
Description
Adds a new keyframe or marker to the named property at the specified time and returns the index of the new keyframe.
Parameters
time The time, in seconds, at which to add the keyframe. A floating-point value. The beginning of the composition is 0.
Returns
Integer; the index of the new keyframe or marker.