Fixes #5821 - add capsule support to API/CLI