Try our new documentation site (beta).
API keys
An API key consist of an access ID and a secret key. Different types of API keys can be retrieved and managed:
Legacy API v1 keys | The legacy API v1 keys can be used only with the API v1. The API v1 is deprecated, and applications should be migrated to the API v2 using new keys. Once the migration is done, the existing API v1 key can be deleted. |
API keys for all licenses | The API v2 keys can access all the licenses, machines and pools associated with your account. Multiple keys can be generated. |
API keys for a specific license | The API v2 keys can access only the specified license. Only machines and pools created for this license can be managed. Multiple keys can be generated. |
Finally, you can perform the following actions:
![]() |
Add and generate a new key. |
![]() |
Regenerate the secret key. If a secret key has been compromised, it can be regenerated. However, it may be a better approach to create a new key instead, and replace it. |
![]() |
Delete a key. Once deleted, any application using this key will be immediately blocked. Note that the default key of a specific license cannot be deleted. |
![]() |
Download the default license file. The default license file can be used right away to start machines in the Cloud using the dedicated default pool of this license. The license file contains the access ID and secret key for the selected license. You just have to place this file in your home directory or one of the following locations where XXX is the Gurobi Optimizer version you are using:
Or set the environment variable |
Multiple Keys
The API v2 supports multiple simultaneous API keys per license or for all licenses. This is useful when one need to replace an API key that is already in use by an application or some users. With this feature, you can generate a new key, update the applications or notify the users, and finally delete the old key when necessary. During this process, you will not incur downtime of the applications or experience user access issues. You can also generate multiple keys for tracking purpose.
![](/wp-content/plugins/hd_documentations/content/images/documentation-ampl-guide.webp?x70725)
![](/wp-content/plugins/hd_documentations/content/images/documentation-cloud.webp?x70725)
![](/wp-content/plugins/hd_documentations/content/images/documentation-example-tour.webp?x70725)
![](/wp-content/plugins/hd_documentations/content/images/documentation-quick-start.webp?x70725)
![](/wp-content/plugins/hd_documentations/content/images/documentation-reference-manuals.webp?x70725)
![](/wp-content/plugins/hd_documentations/content/images/documentation-remote-services.webp?x70725)
![](/wp-content/plugins/hd_documentations/content/images/quickstart-os-linux.webp?x70725)
![](/wp-content/plugins/hd_documentations/content/images/quickstart-os-mac-osx.webp?x70725)
![](/wp-content/plugins/hd_documentations/content/images/quickstart-os-windows.webp?x70725)