How to hide or remove default cancel in Atlassian dialog

AP.require('dialog', function(dialog) {
    key: 'my-key',
    width: '1024px',
    height: '630px'
  }).on("close", function () {
    console.log("dialog closed");

I need to hide or remove both submit and cancel buttons which comes in the dialog box by default (other than putting “chrome” : false)

AP.dialog.getButton(‘submit’).hide(); this is working submit button gets removed .

AP.dialog.getButton(‘cancel’).hide(); this is not working

Any solution to hide default cancel button ?

Thanks in advance