The current documentation for creating an API key for user is on the wiki at https://wiki.civicrm.org/confluence/display/CRMDOC/REST+interface#RESTinterface-CreatingAPIkeysforusers. Unfortunately there is not a release for the user friendly API Key extension for CiviCRM 4.5, 4.6 or 4.7. And the manual method is not very user friendly for those who are not programmers. How can a relatively non-technical user set up an API key that is needed for an extension, for example?
Hopefully a new release will be made for the API Key extension soon. Here are detailed instructions for creating one manually without needing to get access to your database through phpMyAdmin, mysql on the command line or some similar MySQL database administration tool.
Usually it is a good idea to create a special separate contact for each service that needs to use CiviCRM's REST API. Do this at Contact > New Individual, enter a name like Attentive.ly Service, and click Save. At the bottom of your page in small faint type and in the url you can get the Contact ID of the new contact.
Create a 16 character random value for the API Key, eg at http://passwordsgenerator.net/ with settings that exclude special characters, eg
For those wanting to use APIv3, navigate to Support > Developer > Api v3 (/civicrm/api3#explorer), and enter the following values then click on the Execute button. Note that the image shows Internal Contact ID as the fieldname. This is true CiviCRM up to version 4.6, but you'll need to select the Contact ID for versions 4.7 and above since it was relabeled in the API Explorer.
You will need to ensure that the contact is given a role that has the appropriate permissions required for the relevant Extension. At a minimum this will include 'Access AJAX API', and unless otherwise specified, 'Administer CiviCRM'.
You need to use the extension which creates an 'API Key' tab on the contact record.
To add an API key to an existing contact in API Explorer v4:
navigate to Support > Developer > API Explorer v4.
In the "entity" drop-down menu select "contact", in the "action" drop-down select "update".
In the "where" section select "id" from the "add clause" drop-down and make that equal to the contact id of the contact that you wish to add the API key to.
In the "values" section select api_key from the "add value" drop-down and add your desired API key to the box that appears next to it.
click the execute button.