To generate an API key, follow these instructions:
- Go to My account > API

- Click Create API KEY

- Choose the list/lists you want, select the type of access, fill in the IP (noncomplusory feature) or you can leave the IP section blank, and save.

Your API key has just been created:

You can find more details about it here: documentation and API methods.