From the commit history, it looks like :composition
was only added in v1.25.0 of the SDK. The documentation published on the site only reflects the latest version of the SDK. If you update to the latest version, you should be able to use this parameter. Note however that it is documented as an array of hashes, so you will have to wrap your composition structure in an array of hashes:
composition: [{time_span: {duration: '...'}}]