No idea if this can be done the Drupal way. I tried:
// load SDK drupal_add_js('//platform.example.com/api.js', 'external'); drupal_add_js('api_key: [key]', 'inline');
But without success. The API_key declaration need to be done inside the first tag that links to the external JS. I know you can add extra parameters like documented on https://api.drupal.org/api/drupal/includes%21common.inc/function/drupal_add_js/7.x but this case is not described.