It can be done by using the code to create the field. You can create a text field in a settings page to save the Google API key, then when creating the field, just get the option value and assign it to the api_key setting. https://docs.metabox.io/fields/map/#sample-code