Hi,
The way to pass the api key in the example is to set it as an environment variable named "FREESOUND_API_KEY" (see message on screen). What you have done is to replace the "FREESOUND_API_KEY" string for your api key. The whole point of this is that your specific key is not hardcoded in the file so, for example, you can commit the file to a repository and it does not contain the "secret". The python function os.getenv gets and environment variable with the provided name. What you're trying to do is to get an environment variable named "XgAJ..." instead of one named "FREESOUND_API_KEY". You can also hardcode your api key in the example file, but you should do it using the freesound_client.set_token function, not os.getenv. Your possible solutions are:
1) Set the env variable before running the script, eg "export FREESOUND_API_KEY=YOUR_API_KEY; python examples.py"
2) set api_key="YOUR_API_KEY" instead of trying to retrieve it from the environment using os.getenv
Hope this helps,
Cheers,
frederic