Doing a simple checkbox in field API
You can always just create a field in the UI and extract the settings from there. Or look at the defaultSettings() method in the plugin class, where you can find this:

/**
 * {@inheritdoc}
 */
public static function defaultSettings() {
  return array(
    'display_label' =&gt; FALSE,
  ) + parent::defaultSettings();
}


So, add 'settings' =&gt; ['display_label' =&gt; TRUE] to your form display definition and you have what you want.