Update example with updated cosmic api.