Dan Holevoet's comment helped to solve this one.
It turns out that there is a problem with the parameterized objectivity key which was shown in the stack trace. Removing the Key fields caused the .api files to be re-generated successfully.
As pointed out in the comment below - this is expected to be resolved in the next version of the SDK.